diff --git a/.github/workflows/site-preview.yml b/.github/workflows/site-preview.yml index 6b8fc490..a61de1dc 100644 --- a/.github/workflows/site-preview.yml +++ b/.github/workflows/site-preview.yml @@ -15,22 +15,22 @@ 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 @@ -38,7 +38,7 @@ jobs: 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: | @@ -46,6 +46,9 @@ jobs: 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: @@ -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 diff --git a/.gitignore b/.gitignore index a4dc6ba0..51caf258 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ node_modules dist .idea .parcel-cache +.env # Local Netlify folder .netlify