Merge pull request #793 from harehare/fix/formatter-comment-indentati… #494
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: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| if: github.actor != 'dependabot[bot]' && contains(github.event.commits.*.message, '[skip ci]') == false | |
| outputs: | |
| docs: ${{ steps.filter.outputs.docs }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| docs: | |
| - 'docs/**' | |
| build_and_deploy: | |
| needs: changes | |
| runs-on: ubuntu-latest | |
| if: ${{ needs.changes.outputs.docs == 'true' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .tool-versions | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install tools | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: wasm-pack,mdbook | |
| - uses: extractions/setup-just@v3 | |
| - name: Build | |
| run: just build-wasm | |
| - name: Build mdbook | |
| run: mdbook build -d ../book | |
| working-directory: ./docs/books | |
| - name: Install playground dependencies | |
| run: npm ci | |
| working-directory: ./packages/playground | |
| - name: Build playground | |
| run: npm run build | |
| working-directory: ./packages/playground | |
| - name: Install tools dependencies | |
| run: npm ci | |
| working-directory: ./packages/tools | |
| - name: Build tools | |
| run: npm run build | |
| working-directory: ./packages/tools | |
| - name: Copy install script | |
| run: cp ./scripts/install.sh ./docs | |
| - name: Deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy docs --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }} |