-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make version check script more explicit Instead of calling ]up, it calls ]add Turing@<desired_version>, which more closely matches our intentions * Fix version check GHA to not always show green tick * Separate preview + remove-preview workflows * Don't run preview on closed PRs
- Loading branch information
1 parent
8911dac
commit b7d983f
Showing
4 changed files
with
44 additions
and
36 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Remove PR previews | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
delete-preview-directory: | ||
if: github.event.action == 'closed' || github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
|
||
- name: Remove PR Preview Directory | ||
run: | | ||
PR_NUMBER=${{ github.event.pull_request.number }} | ||
PREVIEW_DIR="pr-previews/${PR_NUMBER}" | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git pull origin gh-pages | ||
rm -rf ${PREVIEW_DIR} | ||
git add . | ||
git commit -m "Remove preview for merged PR #${PR_NUMBER}" | ||
git push |
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
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