Skip to content

Publish Website

Publish Website #105

name: Publish Website
on:
workflow_dispatch:
push:
paths:
- 'website/*'
branches:
- main
permissions:
contents: write
jobs:
website:
name: Publish website
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
working-directory: website
run: |
npm ci
- name: Build website
working-directory: website
run: |
npm run build
- name: Publish website
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build