Skip to content

gh-pages

gh-pages #429

Workflow file for this run

name: Deploy GitHub pages
env:
NODE_VERSION: 20
GH_PAGES_DIR: _site
on:
push:
branches:
- gh-pages-pipeline
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# with:
# persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci --no-audit --no-progress
- name: Build
run: npm run build -- --env out=$GH_PAGES_DIR
- name: Fix permissions
run: |
chmod -c -R +rX "$GH_PAGES_DIR/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
deploy:
needs: build
permissions:
pages: write
id-token: write
actions: read
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4