Merge pull request #146 from KitsuneDev/linux-macos-paths #349
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy docs | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
deploy-gh-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# pnpm cache (compatible with pnpm 7+/8+/9+ if .pnpm-store exists) | |
- name: Cache pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-store-${{ runner.os }}-${{ hashFiles('docs/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm-store-${{ runner.os }}- | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.4.0 | |
run_install: true | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
# node-version: 20 | |
node-version-file: docs/package.json | |
cache: pnpm | |
cache-dependency-path: docs/pnpm-lock.yaml | |
- name: Build documentation site | |
run: cd docs; pnpm docs:build | |
- name: Deploy to GitHub Pages | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: docs/.vuepress/dist | |
fqdn: windea.icu | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |