fix: deploy workflow

This commit is contained in:
2025-06-01 20:56:18 +02:00
parent 86872d453b
commit 222b05e155

View File

@@ -1,34 +1,51 @@
name: Deploy to GitHub Pages # Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on: on:
# Runs on pushes targeting the default branch
push: push:
branches: [ main ] branches: ['main']
pull_request:
branches: [ main ] # Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
jobs: jobs:
build-and-deploy: # Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Node
- name: Setup Node.js uses: actions/setup-node@v4
uses: actions/setup-node@v4 with:
with: node-version: lts/*
node-version: '24' cache: 'npm'
cache: 'npm' - name: Install dependencies
run: npm ci
- name: Install dependencies - name: Build
run: npm i run: npm run build
- name: Setup Pages
- name: Build uses: actions/configure-pages@v5
run: npm run build - name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub Pages with:
uses: peaceiris/actions-gh-pages@v3 # Upload dist folder
if: github.ref == 'refs/heads/main' path: './dist'
with: - name: Deploy to GitHub Pages
github_token: ${{ secrets.GITHUB_TOKEN }} id: deployment
publish_dir: ./dist uses: actions/deploy-pages@v4