action.yml 757 B

123456789101112131415161718192021222324252627
  1. name: Setup
  2. description: Setup Node.js and install dependencies
  3. runs:
  4. using: composite
  5. steps:
  6. - name: Setup Node.js
  7. uses: actions/setup-node@v3
  8. with:
  9. node-version-file: .nvmrc
  10. - name: Cache dependencies
  11. id: yarn-cache
  12. uses: actions/cache@v3
  13. with:
  14. path: |
  15. **/node_modules
  16. .yarn/install-state.gz
  17. key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
  18. restore-keys: |
  19. ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
  20. ${{ runner.os }}-yarn-
  21. - name: Install dependencies
  22. if: steps.yarn-cache.outputs.cache-hit != 'true'
  23. run: yarn install --immutable
  24. shell: bash