mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-09 23:39:48 +01:00
Compare commits
2 commits
9b587fafcc
...
edda78d91e
Author | SHA1 | Date | |
---|---|---|---|
edda78d91e | |||
7324474ef8 |
1 changed files with 31 additions and 13 deletions
44
.github/workflows/docs-preview.yml
vendored
44
.github/workflows/docs-preview.yml
vendored
|
@ -68,41 +68,59 @@ jobs:
|
|||
needs: build-preview
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set preview URL
|
||||
id: set-url
|
||||
- name: Prepare Environment
|
||||
id: prelude
|
||||
run: |
|
||||
PR_NUMBER=${{ github.event.pull_request.number }}
|
||||
URL="https://${{ github.repository_owner }}.github.io/nvf/docs-preview-${PR_NUMBER}/"
|
||||
|
||||
echo "Live Preview URL: $URL"
|
||||
# Propagate non-interpolatable environment vars
|
||||
echo "URL=$URL" >> "$GITHUB_OUTPUT"
|
||||
echo "REV=$GITHUB_SHA" >> "$GITHUB_OUTPUT"
|
||||
echo "ACTOR=$GITHUB_ACTOR" >> "$GITHUB_OUTPUT"
|
||||
echo "REF=$GITHUB_HEAD_REF" >> "$GITHUB_OUTPUT"
|
||||
echo "RUNS=$GITHUB_RUN_NUMBER" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "Live Preview URL: $URL"
|
||||
echo "Rev: $GITHUB_SHA"
|
||||
echo "Actor: $GITHUB_ACTOR"
|
||||
echo "Ref: "$GITHUB_HEAD_REF"
|
||||
echo "Reruns: "$GITHUB_RUN_NUMBER"
|
||||
|
||||
echo "### :rocket: Live Preview Deployed " >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "Preview can be found at ${URL}" >> "$GITHUB_STEP_SUMMARY""
|
||||
echo "Preview can be found at ${URL}" >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Find Comment
|
||||
uses: peter-evans/find-comment@v3
|
||||
id: fc
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
comment-author: "github-actions[bot]"
|
||||
body-includes: "Live preview is ready"
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body-includes: "Live preview deployed"
|
||||
|
||||
- name: Post live preview comment
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
env:
|
||||
COMMENT_ID: ${{ steps.fc.outputs.comment-id }}
|
||||
URL: ${{ steps.prelude.outputs.URL }}
|
||||
GITHUB_SHA: ${{ steps.prelude.outputs.REV }}
|
||||
ACTOR: ${{ steps.prelude.outputs.ACTOR }}
|
||||
REF: ${{ steps.prelude.outputs.REF }}
|
||||
RUNS: ${{ steps.prelude.outputs.RUNS }}
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
comment-id: ${{ env.COMMENT_ID }}
|
||||
issue-number: ${{ github.event.pull_request.number }} # issue number also applies to pull requests
|
||||
edit-mode: replace # replace previous body
|
||||
body: |
|
||||
### 🚀 **Live preview deployed from ${GITHUB_SHA}**
|
||||
View it here: ${{ steps.set-url.outputs.URL }}
|
||||
### :rocket: Live preview deployed from ${{ env.GITHUB_SHA }}
|
||||
|
||||
View it [here](${{ env.URL }}):
|
||||
|
||||
<details>
|
||||
<summary>Debug Information</summary>
|
||||
<p>Triggered by: ${GITHUB_ACTOR}</p>
|
||||
<p>HEAD at: ${GITHUB_HEAD_REF}</p>
|
||||
<p>Reruns: ${GITHUB_RUN_NUMBER}</p>
|
||||
<summary><strong>Debug Information</strong></summary>
|
||||
<p>Triggered by: ${{ env.ACTOR }}</p>
|
||||
<p><code>HEAD</code> at: ${{ env.REF }}</p>
|
||||
<p>Reruns: ${{ env.RUNS }}</p>
|
||||
</details>
|
||||
|
||||
cleanup:
|
||||
|
|
Loading…
Reference in a new issue