# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: 'Node.js CI' on: push: branches: [master] pull_request: branches: [master] jobs: ci_website: runs-on: 'ubuntu-latest' defaults: run: working-directory: 'website' strategy: matrix: node-version: [14.x] steps: - uses: 'actions/checkout@v2' - name: Use Node.js ${{ matrix.node-version }} uses: 'actions/setup-node@v2.1.2' with: node-version: ${{ matrix.node-version }} - name: 'Cache dependencies' uses: 'actions/cache@v2' with: path: '**/node_modules' key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} - run: 'npm install' - run: 'npm run lint' - run: 'npm run build' ci_api: runs-on: 'ubuntu-latest' defaults: run: working-directory: 'api' strategy: matrix: node-version: [14.x] steps: - uses: 'actions/checkout@v2' - name: Use Node.js ${{ matrix.node-version }} uses: 'actions/setup-node@v2.1.2' with: node-version: ${{ matrix.node-version }} - name: 'Cache dependencies' uses: 'actions/cache@v2' with: path: '**/node_modules' key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} - run: 'npm install' - run: 'npm run lint'