Skip to content

Using yarn --immutable instead #168

Using yarn --immutable instead

Using yarn --immutable instead #168

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: corepack enable
- run: yarn set version stable
- run: yarn config set nodeLinker node-modules
- run: yarn --immutable
- run: yarn build
env:
VITE_GCLIENT_ID: ${{ secrets.VITE_GCLIENT_ID }}
VITE_GAPI_KEY: ${{ secrets.VITE_GAPI_KEY }}
VITE_GOAT_COUNTER_ID: ${{ vars.VITE_GOAT_COUNTER_ID }}
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v3
- name: Upload Artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
with:
# location of the coverage artifacts
path: "./dist"
deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
# environment created automatically by GitHub
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2