Skip to content

Deploy to Github Pages #63

Deploy to Github Pages

Deploy to Github Pages #63

Workflow file for this run

name: Deploy to Github Pages
on:
workflow_run:
workflows: [CI]
types:
- completed
branches: ['main']
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
env:
VITE_DEFAULT_EXCEL_ID: ${{ vars.VITE_DEFAULT_EXCEL_ID }}
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build
run: |
npm i -g pnpm
pnpm i
npm run build
cd demo/frontend
pnpm i
npm run build
cd -
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './demo/frontend/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4