Skip to content

Commit 3a25ccf

Browse files
Update preview workflow (#106)
* Bump workflow node version to 16 * Node 20 * Update site-preview.yml * Revert "Update site-preview.yml" This reverts commit fcfb5e8. * chore: Upgrade various action versions * fix: install the netlify CLI properly rather than relying on npx --------- Co-authored-by: Andrew Bridge <andrew@andrewhbridge.co.uk>
1 parent 92f51f9 commit 3a25ccf

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/site-preview.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,40 @@ jobs:
1515
- uses: FranzDiebold/github-env-vars-action@v2
1616
# Checkout both data and website repos
1717
- name: Checkout data
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1919
with:
2020
path: data
2121
- name: Checkout website
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323
with:
2424
repository: audioxide/website
2525
path: website
2626
# Setup node (including yarn)
27-
- name: Use Node.js 14
28-
uses: actions/setup-node@v1
27+
- name: Use Node.js 20
28+
uses: actions/setup-node@v4
2929
with:
30-
node-version: 14
30+
node-version: 20
3131
# Setup caching for images to reduce processing time
3232
- name: Cache images
33-
uses: actions/cache@v2.1.3
33+
uses: actions/cache@v4
3434
with:
3535
# A list of files, directories, and wildcard patterns to cache and restore
3636
path: data/dist
3737
# An explicit key for restoring and saving the cache
3838
key: ${{ env.CI_HEAD_REF_SLUG }}
3939
# Setup caching for dependencies
4040
- name: Cache dependencies
41-
uses: actions/cache@v2.1.3
41+
uses: actions/cache@v4
4242
with:
4343
# A list of files, directories, and wildcard patterns to cache and restore
4444
path: |
4545
data/node_modules
4646
website/node_modules
4747
# An explicit key for restoring and saving the cache
4848
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
49+
- name: Install netlify CLI
50+
run: npm install netlify-cli -g
51+
working-directory: data
4952
- run: yarn
5053
working-directory: data
5154
env:
@@ -54,7 +57,7 @@ jobs:
5457
- run: sed -i "s|^\s*environment.*$||g" netlify.toml
5558
working-directory: data
5659
# Build and deploy the data repo
57-
- run: npx netlify deploy --build --alias data-preview-$CI_REF_NAME_SLUG
60+
- run: netlify deploy --build --alias data-preview-$CI_REF_NAME_SLUG
5861
working-directory: data
5962
env:
6063
GITHUB_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the repo specific token

0 commit comments

Comments
 (0)