2021-06-01 14:11:08 +08:00
|
|
|
name: Build Frontend
|
|
|
|
|
|
|
|
on:
|
|
|
|
# allow manual dispatch
|
|
|
|
workflow_dispatch:
|
|
|
|
# run on PRs
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'frontend/**'
|
|
|
|
|
|
|
|
concurrency:
|
2021-12-04 01:25:37 +08:00
|
|
|
group: ${{ github.ref }}
|
2021-06-01 14:11:08 +08:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2021-12-23 20:34:01 +08:00
|
|
|
node-version: '16'
|
2021-06-01 14:11:08 +08:00
|
|
|
|
|
|
|
- name: Cache Yarn
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: "~/.cache/yarn"
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
|
|
|
|
- name: Install frontend deps
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
run: (cd frontend && yarn install --frozen-lockfile --cache-folder ~/.cache/yarn)
|
|
|
|
|
|
|
|
- name: Lint frontend
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
run: (cd frontend && yarn lint)
|
|
|
|
|
|
|
|
- name: Build frontend
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
# keep these in sync with compose!
|
|
|
|
proxyHost: "http://hangar_new_backend:8080"
|
2021-11-23 14:49:45 +08:00
|
|
|
authHost: "https://hangar-auth.benndorf.dev"
|
2021-06-01 14:11:08 +08:00
|
|
|
host: "0.0.0.0"
|
|
|
|
PUBLIC_HOST: "https://hangar.benndorf.dev"
|
|
|
|
run: (cd frontend && yarn build)
|