You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed
@@ -128,7 +128,7 @@ Output | Description
128
128
`pages-base-url`| What this Action thinks the base URL of the GitHub Pages site is.
129
129
`preview-url-path`| Path to the preview from the Pages base URL.
130
130
`preview-url`| Full URL to the preview (`https://<pages-base-url>/<preview-url-path>/`).
131
-
`action-version`| The version of this Action when it was run.
131
+
`action-version`| The full, exact version of this Action when it was run.
132
132
`action-start-timestamp`| The time that the workflow step started as a Unix timestamp.
133
133
`action-start-time`| The time that the workflow step started in a readable format (UTC, depending on runner).
134
134
@@ -251,7 +251,7 @@ jobs:
251
251
deploy-preview:
252
252
runs-on: ubuntu-latest
253
253
steps:
254
-
- uses: actions/checkout@v3
254
+
- uses: actions/checkout@v4
255
255
- run: npm i && npm run build
256
256
if: github.event.action != 'closed'
257
257
- uses: rossjrw/pr-preview-action@v1
@@ -275,7 +275,7 @@ jobs:
275
275
deploy:
276
276
runs-on: ubuntu-latest
277
277
steps:
278
-
- uses: actions/checkout@v3
278
+
- uses: actions/checkout@v4
279
279
- run: npm i && npm run build
280
280
- uses: JamesIves/github-pages-deploy-action@v4
281
281
with:
@@ -344,16 +344,68 @@ on:
344
344
- synchronize
345
345
jobs:
346
346
deploy-preview:
347
-
runs-on: ubuntu-20.04
347
+
runs-on: ubuntu-latest
348
348
steps:
349
-
- uses: actions/checkout@v3
349
+
- uses: actions/checkout@v4
350
350
- run: npm i && npm run build
351
351
- uses: rossjrw/pr-preview-action@v1
352
352
with:
353
353
source-dir: ./build/
354
354
action: deploy
355
355
```
356
356
357
+
### Customise the sticky comment
358
+
359
+
You can use `id`, `with: comment: false`, the output values and [context variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs) to construct your own comment to be left on the PR. This example recreates this Action's default comment (complete with HTML spacing jank), but you could change it however you like, use a different commenting Action from the marketplace, etc.
| <h6>Built to branch [`${{ env.PREVIEW_BRANCH }}`](${{ github.server_url }}/${{ github.repository }}/tree/${{ env.PREVIEW_BRANCH }}) at ${{ steps.preview-step.outputs.action-start-time }}. <br> Preview will be ready when the [GitHub Pages deployment](${{ github.server_url }}/${{ github.repository }}/deployments) is complete. <br><br> </h6>
0 commit comments