Skip to content

Major: Generate new theme, docs, config #2

Major: Generate new theme, docs, config

Major: Generate new theme, docs, config #2

name: Deploy Docusaurus to GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
- main
- master
# Runs on each PR
pull_request:
branches:
- "master"
- 'main'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
name: Deploy Docusaurus to GitHub Pages
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Build website
shell: bash
run: npm run build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build