Merge pull request #22 from duboiss/feature/dependencies #58
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: Build assets | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- 'assets/**' | |
- 'webpack.config.js' | |
- 'yarn.lock' | |
jobs: | |
yarn: | |
name: Yarn | |
runs-on: 'ubuntu-20.04' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: yarn-cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-yarn-cache-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-cache-node-modules- | |
- name: Yarn install | |
if: steps.yarn-cache-node-modules.outputs.cache-hit != 'true' | |
run: yarn install | |
- name: Yarn build | |
run: yarn run encore production | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build | |
path: public/build |