name: Build site on: push: branches: - master paths: - '.github/workflows/build.yml' - 'README.md' jobs: build_site: runs-on: ubuntu-latest name: Build site steps: - uses: actions/checkout@master with: fetch-depth: 1 - uses: actions/setup-node@master with: node-version: '12.x' - name: Determine npm cache directory id: npm-cache run: | echo "::set-output name=dir::$(npm config get cache)" - name: Restore npm cache uses: actions/cache@v1 with: path: ${{ steps.npm-cache.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - run: npm run build