Use code groups #14
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: publish-docs | |
on: | |
push: | |
paths: | |
- '.github/workflows/**' | |
- '.vitepress/**' | |
- 'src/**' | |
jobs: | |
publish-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
- name: Install nodejs ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build static content | |
run: pnpm build | |
- name: Check GitHub Pages status | |
uses: crazy-max/ghaction-github-status@v3 | |
with: | |
pages_threshold: major_outage | |
- name: Deploy to GitHub Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
target_branch: gh-pages | |
build_dir: .vitepress/dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |