Skip to content

Deploy GitHub pages via ci #33

Deploy GitHub pages via ci

Deploy GitHub pages via ci #33

Workflow file for this run

name: CI
on: [ "push", "pull_request" ]
jobs:
build:
name: Lint and build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9.0.6
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Build
run: pnpm run build
- name: Bundle files for deployment
run: tar -cvf github-pages.tar dist www index.html
- name: Upload artifact for deployment
uses: actions/upload-artifact@v4
with:
name: github-pages
path: github-pages.tar
deploy:
name: Deploy to GitHub Pages
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4