name: docs on: push: branches: [main, docs] paths: - 'docs/**' - '.github/workflows/docs.yml' workflow_dispatch: jobs: docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup yarn uses: actions/setup-node@v3 with: node-version: 18 cache: yarn - name: Install dependencies run: yarn install - name: Build VuePress site run: yarn docs:build - name: Deploy to GitHub Pages uses: crazy-max/ghaction-github-pages@v2 with: target_branch: gh-pages build_dir: docs/.vuepress/dist env: GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}