Skip to content

Commit b1bd195

Browse files
committed
action still disabled, but tweak for security
1 parent b00b0d0 commit b1bd195

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/preview.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,32 @@ on:
1111
# branches:
1212
# - master
1313

14-
# contents: write is required for deploying the GitHub Pages if using the default GITHUB_TOKEN
15-
# pull-requests: write is required if you want to comment the preview page url to the pull request
1614
permissions:
17-
pull-requests: write
18-
contents: write
15+
contents: read
1916

20-
# recommended to set a concurrency group
2117
concurrency:
2218
group: preview-pages-${{ github.ref }}
2319
cancel-in-progress: true
2420

2521
jobs:
2622
run:
23+
name: "Build PR preview"
2724
runs-on: ubuntu-latest
25+
permissions:
26+
# contents: write is required for deploying the GitHub Pages if using the default GITHUB_TOKEN
27+
# pull-requests: write is required if you want to comment the preview page url to the pull request
28+
pull-requests: write
29+
contents: write
2830
steps:
2931
- name: Checkout
30-
uses: actions/checkout@v3
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
with:
34+
persist-credentials: false
3135

3236
# run some build steps here and export the result to a directory
3337

3438
- name: Preview Pages
35-
uses: rajyan/preview-pages@v1
39+
uses: rajyan/preview-pages@e76dc46e784379df4f2a5db53dbb0370fd9277bf # v1.3.28
3640
with:
3741
source-dir: .
3842
target-branch: master

0 commit comments

Comments
 (0)