Test deploy adjustments #182
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node Build | |
on: | |
pull_request: | |
paths: | |
- src/** | |
- .eslintrc.js | |
- stylelint.config.js | |
- webpack.js | |
push: | |
branches: | |
- main | |
paths: | |
- src/** | |
- .eslintrc.js | |
- stylelint.config.js | |
- webpack.js | |
jobs: | |
build: | |
name: node-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set app env | |
run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # | |
with: | |
path: ${{ env.APP_NAME }} | |
- name: Read package.json node and npm engines version | |
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 | |
id: versions | |
with: | |
path: ${{ env.APP_NAME }} | |
fallbackNode: "^20" | |
fallbackNpm: "^9" | |
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | |
with: | |
node-version: ${{ steps.versions.outputs.nodeVersion }} | |
- name: Set up npm ${{ steps.versions.outputs.npmVersion }} | |
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" | |
- name: Build ${{ env.APP_NAME }} | |
run: | | |
cd ${{ env.APP_NAME }} | |
npm ci | |
npm run build |