Skip to content

Commit

Permalink
Merge pull request #904 from Cysharp/feature/docs-v7-docusaurus
Browse files Browse the repository at this point in the history
Renewal of documents
  • Loading branch information
mayuki authored Jan 31, 2025
2 parents 712b58f + 3c058cd commit d7c0422
Show file tree
Hide file tree
Showing 126 changed files with 37,602 additions and 2,017 deletions.
58 changes: 43 additions & 15 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,57 @@
name: Update Docs
name: Deploy to GitHub Pages

on:
push:
branches:
- main
paths:
- 'docs/**'
workflow_dispatch:

jobs:
run-docfx:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: Cysharp/DocfxTemplate
path: docs/_DocfxTemplate
- uses: Kirbyrawr/docfx-action@master
name: Docfx metadata
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
args: metadata docs/docfx.json
- uses: Kirbyrawr/docfx-action@master
name: Docfx build
version: 9
- uses: actions/setup-node@v4
with:
args: build docs/docfx.json
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
node-version: 18
cache: 'pnpm'
cache-dependency-path: 'docs/pnpm-lock.yaml'
- name: Install dependencies
working-directory: docs
run: pnpm install --frozen-lockfile
- name: Build website
working-directory: docs
run: pnpm build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
path: docs/build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
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
Loading

0 comments on commit d7c0422

Please sign in to comment.