Skip to content

Deploy Playground to GitHub Pages #3

Deploy Playground to GitHub Pages

Deploy Playground to GitHub Pages #3

Workflow file for this run

name: Deploy Playground to GitHub Pages
on:
push:
branches: ["main"]
paths:
- 'fe/**'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
id: node-setup
with:
node-version: '20'
cache: 'pnpm'
- name: Install PNPM
uses: pnpm/action-setup@v3
id: pnpm-setup
with:
version: 8
run_install: true
- name: Setup PNPM
run: |
echo "PNPM_HOME=$HOME/.local/share/pnpm" >> $GITHUB_ENV
echo "$HOME/.local/share/pnpm" >> $GITHUB_PATH
- name: Install dependencies
working-directory: ./fe
run: pnpm install --frozen-lockfile
- name: Build project
working-directory: ./fe
run: |
pnpm compile
pnpm build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './fe/container/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4