Merge pull request #2077 from harehare/dependabot/npm_and_yarn/packag… #1310
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"] | |
| paths: | |
| - "docs/**" | |
| - "packages/mq-playground/**" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build_and_deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| package_json_file: packages/mq-playground/package.json | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .tool-versions | |
| package-manager-cache: false | |
| - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 | |
| with: | |
| cache: false | |
| - name: Install tools | |
| uses: taiki-e/install-action@07b4745e0c39a41822af610387492e3e53aa222b # v2.83.4 | |
| with: | |
| tool: wasm-pack,mdbook | |
| - uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0 | |
| - name: Build mdbook | |
| run: mdbook build -d ../book | |
| working-directory: ./docs/books | |
| - name: Install playground dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: ./packages/mq-playground | |
| - name: Build playground | |
| run: pnpm run build | |
| working-directory: ./packages/mq-playground | |
| - name: Copy install script | |
| run: | | |
| cp ./scripts/install.sh ./docs | |
| cp ./scripts/install_lsp.sh ./docs | |
| cp ./scripts/install_crawler.sh ./docs | |
| - name: Deploy | |
| uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy docs --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }} |