Update docs #212
This file contains 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: | |
- main | |
paths: | |
- 'docs/**' | |
- '.github/workflows/deploy-docs.yml' | |
permissions: | |
contents: write | |
jobs: | |
deploy-gh-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
cache-dependency-path: docs/pnpm-lock.yaml | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.3' | |
- name: Build Docs | |
env: | |
NODE_OPTIONS: --max_old_space_size=8192 | |
run: |- | |
cd docs | |
npm i | |
npm run docs:build | |
> src/.vuepress/dist/.nojekyll | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: docs/src/.vuepress/dist | |
- name: Upload to jaronnie/jzero-docs-deploy-pages | |
run: | | |
go install github.com/jaronnie/grum@latest | |
GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }} grum clone https://github.com/jaronnie/jzero-docs-deploy-pages | |
cd jzero-docs-deploy-pages | |
git config user.name "dependabot[bot]" | |
git config user.email "49699333+dependabot[bot]@users.noreply.github.com" | |
find . -type f -mindepth 1 ! -path "./vercel.json" ! -path "./.git/*" -exec rm -rf {} + | |
mv ../docs/src/.vuepress/dist/* ./ | |
git add . | |
git diff-index --quiet HEAD || git commit -m "chore(docs): update docs" | |
git push -f |