Skip to content

Commit

Permalink
ci: GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cllemon committed Jan 11, 2024
1 parent f1e7e26 commit 27336d5
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/GHPages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: GitHub Pages

on:
workflow_dispatch: null
push:
paths:
- "docs/**"
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true

jobs:
deployDocs:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- name: Install Packages
run: pnpm install

- name: Build docs
run: pnpm run docs:build

- name: Setup Github Pages
uses: actions/configure-pages@v1

- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/.vitepress/dist

- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 27336d5

Please sign in to comment.