Skip to content

Commit

Permalink
add a comment when the preview is done
Browse files Browse the repository at this point in the history
  • Loading branch information
plt-amy committed Sep 12, 2023
1 parent 42386d7 commit 1068738
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/preview.yml
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
Expand All @@ -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: |
Expand All @@ -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 }}
Expand All @@ -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 }})

0 comments on commit 1068738

Please sign in to comment.