diff --git a/.github/workflows/push-to-stage.yml b/.github/workflows/push-to-stage.yml deleted file mode 100644 index 860408835..000000000 --- a/.github/workflows/push-to-stage.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Push to Staging - -on: - push: - pull_request: - types: - - opened - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - # Github uses different branch var names for push vs PR event types - - name: Extract branch name (PR Only) - if: github.event.action == 'opened' - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_HEAD_REF#refs/heads/})" - id: extract_branch_pr - - uses: actions/checkout@v5 - - name: Install dependencies - run: npm install - - uses: ./ - - name: Run tests - run: npm run test - - uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311 - if: github.event_name == 'push' - with: - args: --acl public-read --follow-symlinks - env: - AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - SOURCE_DIR: 'generated' - DEST_DIR: 'trackerblocking/config/staging/${{ steps.extract_branch.outputs.branch }}' - - uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b - if: github.event.action == 'opened' - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - message: 'Your PR is being temporarily hosted at https://staticcdn.duckduckgo.com/trackerblocking/config/staging/${{ steps.extract_branch_pr.outputs.branch }} until this branch is deleted.' diff --git a/.github/workflows/remove-from-stage.yml b/.github/workflows/remove-from-stage.yml deleted file mode 100644 index 604271d33..000000000 --- a/.github/workflows/remove-from-stage.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Remove from Staging - -on: - pull_request: - types: - - 'closed' - -jobs: - remove: - runs-on: ubuntu-latest - steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_HEAD_REF#refs/heads/})" - id: extract_branch - - name: Remove from s3 - uses: vitorsgomes/s3-rm-action@88c92c6bf3f0768c8462ee057f8c7ae8a7a8b70e - with: - args: --recursive - env: - AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - PATH_TO_DELETE: 'trackerblocking/config/staging/${{ steps.extract_branch.outputs.branch }}/'