Skip to content

Commit

Permalink
created workflow to delete PR prefix after merge (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesfused authored Nov 20, 2024
1 parent 1b34ba8 commit ce01584
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pr-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Delete PR prefix on merge
run-name: Delete PR prefix on merge

on:
pull_request:
types: [closed]

env:
BUCKET_NAME: 's3://docs-staging.fused.io'

jobs:
delete-s3-prefix:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::926411091187:role/github_website_role
role-session-name: GithubFusedLabsFusedPyReleaseDocs
aws-region: us-west-2

- name: Delete PR prefix
run: |
aws s3 rm ${{env.BUCKET_NAME}}/pr/${{github.event.pull_request.number}} --recursive

0 comments on commit ce01584

Please sign in to comment.