Skip to content

Website Deploy

Website Deploy #147

name: Website Deploy
on:
release:
types:
- published
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./website
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'release' && 'main' || github.ref }}
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- uses: actions/configure-pages@v5
- run: npm ci
- run: npm run build
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4