Skip to content

Update gh-pages.yml #93

Update gh-pages.yml

Update gh-pages.yml #93

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Deploy static content to Github-Pages
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# 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:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Clean Install
run: npm ci
- name: Build for production
run: npm run build:prod --if-present
- name: Setup Pages
uses: actions/configure-pages@v5
# From that doc https://vite.dev/guide/static-deploy#building-the-app
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
# Upload dist folder
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}