-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (38 loc) · 1.11 KB
/
ci-app-build.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
---
# Automates building of React build
name: ci-app-build
# Define the events that trigger the workflow
on:
push:
branches:
# You can change the default value as needed
- '*'
workflow_dispatch:
# Define the jobs in the workflow
jobs:
build-app:
runs-on: ubuntu-latest
# You can change the default value as needed
env:
# Directory of React app
app-directory: ./web/packages/app
steps:
# Step: Check out the repository's code to the runner
- name: checkout-code
uses: actions/checkout@v3
# Step: Clean previous build to remove deprecated files before building
- name: clean-previous-react-build
working-directory: ${{env.app-directory}}
run: rm -rf ./build
# Step: Build React app
- name: build-react-app
working-directory: ${{env.app-directory}}
run: |
npm ci
npm run build
# Step: List files in app build directory
- name: list-files-react-build
working-directory: ${{env.app-directory}}
run: |
directory="./build"
ls "$directory"