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: '24' node-version: lts/*
cache: 'npm' cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm i run: npm ci
- name: Build - name: Build
run: npm run build run: npm run build
- name: Setup Pages
- name: Deploy to GitHub Pages uses: actions/configure-pages@v5
uses: peaceiris/actions-gh-pages@v3 - name: Upload artifact
if: github.ref == 'refs/heads/main' uses: actions/upload-pages-artifact@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Upload dist folder
publish_dir: ./dist path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4