Deploy Docs #19
Workflow file for this run
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: | |
paths: | |
- '**/*.md' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Run Workflow if "docs" found | |
run: | | |
if git log -1 --pretty=%B | grep -qE '.*docs.*'; then | |
echo "Docs found in the commit message. Triggering workflow..." | |
else | |
echo "No docs found in the commit message. Skipping workflow." | |
exit 78 # exit with a neutral status code to indicate skipping the workflow | |
fi | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 7.29.3 | |
- name: Set node version to 18.15.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.15.0 | |
registry-url: https://registry.npmjs.org/ | |
cache: 'pnpm' | |
- name: Install deps | |
run: pnpm install | |
- name: Build Docs | |
run: pnpm run docs:build | |
- name: Deploy Docs | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
publish_dir: ./docs-dist |