-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (44 loc) · 1.25 KB
/
build_frontend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build CIViC Frontend
on:
workflow_call:
inputs:
branch:
required: true
type: string
jobs:
build_frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: ./server
bundler-cache: true
ruby-version: '3.3'
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install -g yarn
working-directory: ./client
- run: yarn install
working-directory: ./client
- run: rm -f public/*.js
working-directory: ./server
- run: yarn build
working-directory: ./client
- run: bundle exec rails assets:precompile
working-directory: ./server
- if: ${{ inputs.branch == 'staging' }}
run: mv -f lib/assets/favicon.staging.ico public/favicon.ico
working-directory: ./server
- name: Commit and push build
uses: EndBug/add-and-commit@v9
with:
add: server/public/*
push: origin ${{ inputs.branch }}
message: Automated frontend build