fix(docker): give a preview its own login apps and signing key #308
Workflow file for this run
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
| # Documentation Preview Teardown | |
| # | |
| # Separate workflow for tearing down Surge.sh previews when PRs close. | |
| # This is in a separate file because: | |
| # 1. Path filters are unreliable for 'closed' events | |
| # 2. Keeping deployment and teardown separate is cleaner | |
| # 3. Teardown is a no-op if no preview exists (safe to run always) | |
| name: CD / Docs Teardown | |
| on: | |
| pull_request: | |
| types: [closed] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| teardown: | |
| name: Teardown Preview | |
| runs-on: ubuntu-latest | |
| env: | |
| PREVIEW_URL: ls1intum-hephaestus-docs-pr-${{ github.event.number }}.surge.sh | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| sparse-checkout: | | |
| .github/actions/setup-pnpm-node | |
| .node-version | |
| pnpm-lock.yaml | |
| sparse-checkout-cone-mode: false | |
| - name: Setup pnpm + Node.js | |
| uses: ./.github/actions/setup-pnpm-node | |
| - name: Teardown Surge.sh preview | |
| run: pnpm dlx surge teardown ${{ env.PREVIEW_URL }} --token ${{ secrets.SURGE_TOKEN }} | |
| continue-on-error: true | |
| - name: Update PR comment | |
| uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 | |
| with: | |
| header: docs-preview | |
| message: | | |
| ## 📚 Documentation Preview | |
| ~~Preview has been removed~~ (PR closed) |