-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a comment when the preview is done
- Loading branch information
Showing
1 changed file
with
12 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
name: PR Preview | ||
|
||
on: | ||
pull_request: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
pr-preview: | ||
runs-on: ubuntu-latest | ||
|
@@ -28,7 +31,7 @@ jobs: | |
uses: cachix/cachix-action@v12 | ||
with: | ||
name: 1lab | ||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
skipPush: true | ||
|
||
- name: Build the Shakefile 🧰 | ||
run: | | ||
|
@@ -51,7 +54,7 @@ jobs: | |
NIX_BUILD_SHELL: bash | ||
build_command: | | ||
set -eu | ||
1lab-shake -j all --skip-agda -b https://plt-amy.github.io/1lab-previews/pr-256/ | ||
1lab-shake -j all --skip-agda -b "https://plt-amy.github.io/1lab-previews/pr-${{ github.event.number }}" | ||
eval "$installPhase" | ||
cp -rv _build/site pr-${{ github.event.number }} | ||
|
@@ -65,3 +68,9 @@ jobs: | |
user_email: '[email protected]' | ||
user_name: 'plt-amy' | ||
commit_message: 'Preview of PR #${{ github.event.number }}' | ||
|
||
- name: Inform ℹ️ | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
message: | | ||
[Rendered preview](https://plt-amy.github.io/1lab-previews/pr-${{ github.event.number }}) |