Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/site-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,40 @@ jobs:
- uses: FranzDiebold/github-env-vars-action@v2
# Checkout both data and website repos
- name: Checkout data
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: data
- name: Checkout website
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: audioxide/website
path: website
# Setup node (including yarn)
- name: Use Node.js 14
uses: actions/setup-node@v1
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
# Setup caching for images to reduce processing time
- name: Cache images
uses: actions/cache@v2.1.3
uses: actions/cache@v4
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: data/dist
# An explicit key for restoring and saving the cache
key: ${{ env.CI_HEAD_REF_SLUG }}
# Setup caching for dependencies
- name: Cache dependencies
uses: actions/cache@v2.1.3
uses: actions/cache@v4
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
data/node_modules
website/node_modules
# An explicit key for restoring and saving the cache
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install netlify CLI
run: npm install netlify-cli -g
working-directory: data
- run: yarn
working-directory: data
env:
Expand All @@ -54,7 +57,7 @@ jobs:
- run: sed -i "s|^\s*environment.*$||g" netlify.toml
working-directory: data
# Build and deploy the data repo
- run: npx netlify deploy --build --alias data-preview-$CI_REF_NAME_SLUG
- run: netlify deploy --build --alias data-preview-$CI_REF_NAME_SLUG
working-directory: data
env:
GITHUB_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the repo specific token
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
dist
.idea
.parcel-cache
.env

# Local Netlify folder
.netlify
Expand Down