bug: hono deps on prod deploy patch #10
Workflow file for this run
This file contains 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: Staging Teardown | |
on: | |
pull_request: | |
types: [closed] | |
env: | |
NEON_PROJECT_ID: ${{ secrets.NEON_PROJECT_ID }} | |
NEON_API_TOKEN: ${{ secrets.NEON_API_TOKEN }} | |
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
CF_ACCOUNT_ID: 287572e2291030d8c5e360fcc593a16b | |
GH_ENV_APP_ID: ${{ secrets.GH_ENV_APP_ID }} | |
GH_ENV_APP_PRIVATE_KEY: ${{ secrets.GH_ENV_APP_PRIVATE_KEY }} | |
NEXT_PAGES_PROJECT_NAME: shafa-next | |
HONO_DEPLOY_TAG: shafa-hono-stage-${{ github.event.number }} | |
NEXT_DEPLOY_TAG: shafa-next-stage-${{ github.event.number }} | |
jobs: | |
neon_delete_branch: | |
name: Delete Staging Neon Branch | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete Staging Neon Branch | |
uses: neondatabase/delete-branch-action@v3.1.4 | |
with: | |
project_id: ${{ env.NEON_PROJECT_ID }} | |
branch: ${{ env.HONO_DEPLOY_TAG }} | |
api_key: ${{ env.NEON_API_TOKEN }} | |
cf_teardown: | |
name: Delete Staging Cloudflare Workers & Pages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Teardown Hono | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ env.CF_API_TOKEN }} | |
command: delete --name ${{ env.HONO_DEPLOY_TAG }} | |
workingDirectory: hono | |
- name: Teardown Next | |
run: bash pages_teardown.sh ${{ env.NEXT_PAGES_PROJECT_NAME }} ${{ env.NEXT_DEPLOY_TAG }} ${{ env.CF_ACCOUNT_ID }} ${{ env.CF_API_TOKEN }} | |
working-directory: .github/workflows/utils | |
gh_delete_deploy_env: | |
name: Delete Github Deploy Environment | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get GitHub App Token | |
uses: navikt/github-app-token-generator@a3831f44404199df32d8f39f7c0ad9bb8fa18b1c | |
id: get-token | |
with: | |
app-id: ${{ env.GH_ENV_APP_ID }} | |
private-key: ${{ env.GH_ENV_APP_PRIVATE_KEY }} | |
- name: Delete Hono Github Deploy Environment | |
uses: strumwolf/delete-deployment-environment@v3 | |
with: | |
token: ${{ steps.get-token.outputs.token }} | |
environment: hono-stage-${{ github.event.number }} | |
- name: Delete Next Github Deploy Environment | |
uses: strumwolf/delete-deployment-environment@v3 | |
with: | |
token: ${{ steps.get-token.outputs.token }} | |
environment: next-stage-${{ github.event.number }} |