Skip to content

GitHub Pages Publish #5

GitHub Pages Publish

GitHub Pages Publish #5

Workflow file for this run

name: GitHub Pages Publish
on:
push:
tags: ['*']
workflow_dispatch:
concurrency:
group: gh-pages
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- id: repository-basename
run: |
echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT
shell: bash
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
env:
BASE_URL: ${{ steps.repository-basename.outputs.value }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./packages/website/dist
deploy:
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
id: deployment
uses: actions/deploy-pages@v4