fix(release): make Homebrew tap a best-effort gate in promote-release… #51
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: Docs (GitHub Pages) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| jobs: | |
| deploy: | |
| # Only run on the original repository, not on forks | |
| if: github.repository == 'Pythoughts-labs/pythinker-code' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # pinned from v6.4.0 | |
| with: | |
| node-version: "24" | |
| - name: Cache docs node_modules | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # pinned from v5.0.5 | |
| with: | |
| path: docs/node_modules | |
| key: ${{ runner.os }}-docs-node-modules-${{ hashFiles('docs/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-docs-node-modules- | |
| - name: Configure GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # pinned from v6.0.0 | |
| with: | |
| enablement: true | |
| - name: Set VitePress base | |
| shell: bash | |
| env: | |
| BASE_PATH: ${{ steps.pages.outputs.base_path }} | |
| run: | | |
| set -euo pipefail | |
| if [[ -z "${BASE_PATH}" ]]; then | |
| base="/" | |
| else | |
| base="${BASE_PATH%/}/" | |
| fi | |
| echo "VITEPRESS_BASE=${base}" >> "$GITHUB_ENV" | |
| - name: Install docs dependencies | |
| working-directory: docs | |
| run: npm install --no-package-lock | |
| - name: Build docs | |
| working-directory: docs | |
| env: | |
| VITEPRESS_BASE: ${{ env.VITEPRESS_BASE }} | |
| run: npm run build | |
| - name: Add .nojekyll | |
| run: touch docs/.vitepress/dist/.nojekyll | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # pinned from v5.0.0 | |
| with: | |
| path: docs/.vitepress/dist | |
| - name: Deploy to GitHub Pages | |
| id: deploy | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # pinned from v5.0.0 |