Skip to content

Deploy Pages

Deploy Pages #14

Workflow file for this run

name: Deploy Pages
on:
workflow_run:
workflows: ['CI']
types: [completed]
branches: [main]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: deploy-pages-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build for GitHub Pages
env:
GITHUB_PAGES_BASE: /
run: pnpm run build
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4