npm-install
npm-install copied to clipboard
Add example with Node install
More complex scenario similar to https://github.com/d3lm/ngx-drag-to-select/blob/master/.github/workflows/main.yml
- set particular version of Node
- install dependencies
- run tests
- maybe another job to have a matrix of Node versions?
- maybe build an app and test it in separate jobs?
This is my React App boiler plate which includes auto deployment too using Sam Kirkland's FTP Action
on:
push:
branches:
- master
paths:
- 'client/**'
name: ๐งช Auto | Deploy
jobs:
web-deploy:
name: ๐ Deploy
runs-on: ubuntu-latest
steps:
- name: ๐ Get latest code
uses: actions/[email protected]
- name: ๐ฑโ๐ค Use Node.js 14.16.1
uses: actions/setup-node@v2-beta
with:
node-version: '14.16.1'
- name: ๐ฅ Install & Cache Deps
uses: bahmutov/[email protected]
with:
working-directory: client
- name: ๐จ Build Project
run: INLINE_RUNTIME_CHUNK=false npm run build
working-directory: client
- name: ๐งช Test Build
run: npm test
working-directory: client
- name: ๐งน Lint Build
run: npm run lint:ts
working-directory: client
- name: ๐ Sync files
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.ftpserver }}
username: ${{ secrets.ftpuser }}
password: ${{ secrets.ftppass }}
local-dir: ./client/build/