chore(docs): show absolute URL when redirecting (#1122) #673
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: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| branches: | |
| - master | |
| paths: | |
| - ".github/workflows/deploy-docs.yml" | |
| - "docs/**" | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - ".github/workflows/deploy-docs.yml" | |
| - "docs/**" | |
| workflow_dispatch: | |
| concurrency: | |
| group: deploy-docs-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: { } | |
| jobs: | |
| build: | |
| name: Build docs | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| runs-on: ubicloud-standard-2-ubuntu-2204 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Check out Acton repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| - name: Restore Bun cache | |
| id: bun-cache | |
| uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: &build-docs-bun-cache-paths | | |
| ~/.bun/install/cache | |
| ${{ github.workspace }}/docs/.next/cache | |
| key: ${{ runner.os }}-${{ runner.arch }}-bun-docs-${{ hashFiles('docs/bun.lock') }}-${{ hashFiles('docs/**.[jt]s', 'docs/**.[jt]sx') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-bun-docs-${{ hashFiles('docs/bun.lock') }}- | |
| - name: Install docs dependencies | |
| working-directory: docs | |
| run: bun ci | |
| - name: Generated source | |
| working-directory: docs | |
| run: bun run generated-source | |
| - name: Check docs formatting | |
| working-directory: docs | |
| run: bun run fmt:check | |
| - name: Lint Check docs | |
| working-directory: docs | |
| run: bun run docs-lint | |
| - name: Build docs | |
| working-directory: docs | |
| env: | |
| NEXT_TELEMETRY_DISABLED: '1' | |
| run: bun run build | |
| - name: Save Bun cache | |
| if: github.ref == 'refs/heads/master' && steps.bun-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: *build-docs-bun-cache-paths | |
| key: ${{ steps.bun-cache.outputs.cache-primary-key }} | |
| - name: Upload GitHub Pages artifact | |
| if: github.ref == 'refs/heads/master' && github.repository == 'ton-blockchain/acton' | |
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| path: docs/out | |
| deploy: | |
| name: Deploy docs | |
| if: github.ref == 'refs/heads/master' && github.repository == 'ton-blockchain/acton' | |
| needs: [ build ] | |
| runs-on: ubicloud-standard-2-ubuntu-2204 | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |