Skip to content

Deployment (GitHub Pages) #39

Deployment (GitHub Pages)

Deployment (GitHub Pages) #39

Workflow file for this run

name: Deployment (GitHub Pages)
on:
workflow_dispatch:
workflow_run:
workflows: ["Code Quality"]
branches: [main]
types: [completed]
env:
NODE_VERSION: 20
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
name: 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: ${{ env.NODE_VERSION }}
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Prepare
run: yarn prepare
- name: Build
run: |
yarn build --base="/${{ github.event.repository.name }}/"
cp ./dist/index.html ./dist/404.html
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4