Conversation
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, closed] |
There was a problem hiding this comment.
| types: [opened, synchronize, reopened, closed] | |
| types: [opened, synchronize, reopened] |
Could skip the whole workflow when closing. Teardown is not supported by the official action, but found this where people shared their solution: FirebaseExtended/action-hosting-deploy#60
There was a problem hiding this comment.
If the expiration is for a preview specifically (not global), an alternative would be to have 30 days for all, and close sets it to 1 day so it cleans itself faster.
There was a problem hiding this comment.
oops, opus was hallucinating then.. :-P
| - if: github.event.action != 'closed' | ||
| run: npm ci && npm run predeploy && npm run typedoc |
There was a problem hiding this comment.
Asked copilot how to only run when changes target actual code. Did not try it, but sounds legit
| - if: github.event.action != 'closed' | |
| run: npm ci && npm run predeploy && npm run typedoc | |
| - id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| target: | |
| - 'src/**' | |
| - '!src/__tests__/**' | |
| - 'demo/**' | |
| - if: github.event.action != 'closed' | |
| run: npm ci && npm run predeploy && npm run typedoc |
The deploy action has no teardown, so running it on 'closed' did nothing. A separate cleanup_preview job now deletes the PR's channel with the firebase CLI, and a paths filter skips the build+deploy entirely for PRs that cannot change the deployed output.
|
Visit the preview URL for this PR (updated for commit e51ceb9): https://gcode-preview--pr443-feature-cleanup-depl-g55yzwhm.web.app (expires Sat, 10 Oct 2026 21:06:55 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 59bd114ae4847b32c2bba0b68620b9069a3e3531 |
No description provided.