Skip to content

Deploy to GitHub Pages #2

Deploy to GitHub Pages

Deploy to GitHub Pages #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
name: Deploy
if: >-
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
startsWith(github.event.head_commit.message, 'deploy:')
concurrency:
group: 'deploy-to-github-pages'
cancel-in-progress: true
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Build project
run: npm ci && npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5