From b80a6a9c3e16fbd16411566d882b4ff66ae9ba95 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Tue, 21 Dec 2021 17:50:08 +0000 Subject: [PATCH] chore(ci): remove preview PR workflow (#452) --- .github/workflows/preview_cleanup.yml | 39 ---------------- .github/workflows/preview_pull_request.yml | 52 ---------------------- 2 files changed, 91 deletions(-) delete mode 100644 .github/workflows/preview_cleanup.yml delete mode 100644 .github/workflows/preview_pull_request.yml diff --git a/.github/workflows/preview_cleanup.yml b/.github/workflows/preview_cleanup.yml deleted file mode 100644 index c041f58b..00000000 --- a/.github/workflows/preview_cleanup.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Clean Preview - -#! Safety: -#! this workflow should not execute any untrusted input at all -#! see the docs on `pull_request_target` for more -on: - pull_request_target: - types: [unlabeled] - -jobs: - clean: - runs-on: ubuntu-latest - if: github.event.label.name == 'use-preview' - env: - BASE: refs/pull/${{ github.event.pull_request.number }} - - steps: - - uses: actions/checkout@v2 - with: - ref: build-previews - persist-credentials: false - - - name: clean previews - run: rm -rf "$BASE" - - - name: publish cleaned previews - uses: JamesIves/github-pages-deploy-action@4.1.5 - with: - folder: . - branch: build-previews - commit-message: "Cleaning up build result for #${{ github.event.pull_request.number }}" - - - name: send comment - uses: marocchino/sticky-pull-request-comment@v2 - with: - header: Preview environment - message: | - ## Preview environment - There is no longer a preview enviroment for this pull request due to the `use-preview` label being removed diff --git a/.github/workflows/preview_pull_request.yml b/.github/workflows/preview_pull_request.yml deleted file mode 100644 index 68aca237..00000000 --- a/.github/workflows/preview_pull_request.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Preview Pull Request - -#! Safety: -#! this workflow should not execute any untrusted input at all -#! see the docs on `pull_request_target` for more -on: - pull_request_target: - types: [synchronize, reopened, labeled] - -jobs: - preview: - runs-on: ubuntu-latest - # make sure the pull request is labeled with 'use-preview' - if: github.event.label.name == 'use-preview' || contains(github.event.pull_request.labels.*.name, 'use-preview') - env: - BASE: refs/pull/${{ github.event.pull_request.number }}/merge - REPO: ${{ github.event.repository.name }} - - steps: - - uses: actions/checkout@v2 - - - uses: actions/checkout@v2 - with: - # Head commit of the pull request - ref: ${{ github.event.pull_request.head.sha }} - path: pull - submodules: recursive - - - name: build - uses: ./.github/actions/build - with: - base: /${{ env.REPO }}/${{ env.BASE }}/ - folder: pull - - - name: publish preview - uses: JamesIves/github-pages-deploy-action@4.1.5 - with: - folder: pull/dist - branch: build-previews - target-folder: ${{ env.BASE }} - single-commit: true - commit-message: "Publishing build result from #${{ github.event.pull_request.number }}" - - - name: send comment - uses: marocchino/sticky-pull-request-comment@v2 - with: - header: Preview environment - message: | - ## Preview environment - https://${{ github.repository_owner }}.github.io/${{ env.REPO }}/${{ env.BASE }}/ - - This link will remain active until the `use-preview` label is removed.