Skip to content

Grant contents write permission and add optional PAT for gh-pages dep… #5

Grant contents write permission and add optional PAT for gh-pages dep…

Grant contents write permission and add optional PAT for gh-pages dep… #5

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci
- name: Build and export
run: npm run predeploy
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Optional: set GH_PAGES_PAT secret with a Personal Access Token (repo:public_repo or repo scope) if GITHUB_TOKEN cannot push
personal_token: ${{ secrets.GH_PAGES_PAT }}
publish_dir: ./out