@@ -23,23 +23,24 @@ jobs:
2323
2424 steps :
2525 - name : Checkout repository
26- uses : actions/checkout@v6
26+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2727 with :
2828 ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
2929 fetch-depth : 0
3030 filter : tree:0
31+ persist-credentials : false
3132
3233 - name : Set NX_BASE and NX_HEAD for affected detection
3334 if : github.event_name == 'pull_request'
3435 run : |
35- git fetch origin ${{ github.base_ref } }
36- MERGE_BASE=$(git merge-base HEAD origin/${{ github.base_ref } })
36+ git fetch origin ${GITHUB_BASE_REF }
37+ MERGE_BASE=$(git merge-base HEAD origin/${GITHUB_BASE_REF })
3738 echo "NX_BASE=$MERGE_BASE" >> $GITHUB_ENV
3839 echo "NX_HEAD=HEAD" >> $GITHUB_ENV
3940 echo "Comparing against merge-base: $MERGE_BASE"
4041
4142 - name : Setup Node.js
42- uses : actions/setup-node@v6
43+ uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
4344 with :
4445 node-version : ' 22'
4546 cache : ' yarn'
8081
8182 - name : Upload storybooks artifact
8283 if : github.event_name == 'push' || steps.check-affected.outputs.has_storybooks == 'true'
83- uses : actions/upload-artifact@v6
84+ uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
8485 with :
8586 name : storybooks-${{ github.event_name == 'pull_request' && github.event.pull_request.number || 'main' }}
8687 path : deploy/
@@ -100,17 +101,19 @@ jobs:
100101
101102 steps :
102103 - name : Checkout repository for scripts
103- uses : actions/checkout@v6
104+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
104105 with :
105106 ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
106107 path : repo
108+ persist-credentials : false
107109
108110 - name : Checkout gh-pages branch
109- uses : actions/checkout@v6
111+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
110112 with :
111113 ref : gh-pages
112114 path : gh-pages
113115 fetch-depth : 1
116+ persist-credentials : false
114117
115118 - name : Set deployment directory
116119 id : deploy-dir
@@ -124,10 +127,12 @@ jobs:
124127 echo "DEPLOY_DIR=$DEPLOY_DIR" >> $GITHUB_ENV
125128
126129 - name : Remove old storybook directory
127- run : rm -rf "gh-pages/${{ steps.deploy-dir.outputs.path }}"
130+ run : rm -rf "gh-pages/${DEPLOY_DIR_PATH}"
131+ env :
132+ DEPLOY_DIR_PATH : ${{ steps.deploy-dir.outputs.path }}
128133
129134 - name : Download storybooks artifact
130- uses : actions/download-artifact@v7
135+ uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
131136 with :
132137 name : storybooks-${{ github.event_name == 'pull_request' && github.event.pull_request.number || 'main' }}
133138 path : gh-pages/${{ steps.deploy-dir.outputs.path }}
@@ -160,7 +165,7 @@ jobs:
160165 git push --force origin gh-pages-new:gh-pages
161166
162167 - name : Upload GitHub Pages artifact
163- uses : actions/upload-pages-artifact@v4
168+ uses : actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
164169 with :
165170 path : gh-pages/
166171
@@ -173,11 +178,11 @@ jobs:
173178 steps :
174179 - name : Deploy to GitHub Pages
175180 id : deployment
176- uses : actions/deploy-pages@v4
181+ uses : actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
177182
178183 - name : Create GitHub status check
179184 if : github.event_name == 'pull_request'
180- uses : actions/github-script@v8
185+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
181186 with :
182187 script : |
183188 const deployDir = "${{ needs.prepare.outputs.deploy_dir }}";
0 commit comments