Skip to content

Unify the cookie consent engine for the site #9

Unify the cookie consent engine for the site

Unify the cookie consent engine for the site #9

Workflow file for this run

name: Delete preview on PR close
on:
pull_request:
types: [closed]
jobs:
delete_preview:
runs-on: ubuntu-20.04
env:
PREVIEW_DOMAIN: gradle.github.io
PREVIEW_REPO: community-site-preview
PREVIEW_PATH: ${{ github.event.repository.name }}/pull/${{github.event.number}}
permissions:
pull-requests: write
steps:
- name: make empty dir
run: mkdir public
- name: delete folder
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.PREVIEW_DEPLOYMENT_KEY }}
external_repository: gradle/${{ env.PREVIEW_REPO }}
destination_dir: ${{ env.PREVIEW_PATH }}
- name: Comment on PR
uses: hasura/[email protected]
if: github.event.pull_request.merged == true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
message: >
🪓 PR merged, preview deleted ✅ Enjoy the updated content at https://community.gradle.org/
- name: Comment on PR
uses: hasura/[email protected]
if: github.event.pull_request.merged == false
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
message: >
🪓 PR closed, preview deleted ✅