Copy and adapt better CI from Soketto instead. Hopefully cache bits will improve build speed

This commit is contained in:
James Wilson
2021-08-12 13:51:01 +01:00
parent d4b5c2b0c8
commit 35cfb16ed9
2 changed files with 127 additions and 35 deletions
+12 -6
View File
@@ -6,13 +6,16 @@ name: Frontend CI
on:
push:
paths:
- '.github/workflows/**'
- '.github/workflows/frontend.yml'
- 'frontend/**'
- '!backend/**'
defaults:
run:
working-directory: ./frontend
jobs:
build:
runs-on: ubuntu-latest
strategy:
@@ -21,27 +24,30 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install
working-directory: ./frontend
run: yarn install
- name: check
run: yarn pretty:check
working-directory: ./frontend
- name: Test
run: yarn test
working-directory: ./frontend
- name: Build
working-directory: ./frontend
run: yarn build
- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push template image
uses: docker/build-push-action@v2 # https://github.com/docker/build-push-action
if: matrix.node-version == '12.x'