Skip to content

Commit 0b8974f

Browse files
authored
Create workflow.yml (ADORSYS-GIS#36)
* Create workflow.yml Create a GitHub Actions workflow to automate the build process for a React application. The workflow should trigger on pushes to the main branch and pull requests targeting the main branch. It should set up the Node.js environment, install dependencies, build the React application, and archive the build artifacts. This workflow will streamline the continuous integration process, ensuring that the React application is built consistently and ready for deployment. * Removed 'npm test' * Modify workflow to build for all branches * Switch package management from npm to Yarn * update workflow to use Node.js version 14.x * Update Node.js version to 18.x * removed the --if present option from the yarn build command
1 parent 9ecf366 commit 0b8974f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/node.js.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches:
9+
- '*'
10+
11+
pull_request:
12+
branches:
13+
- '*'
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
node-version: [18.x]
23+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'npm'
32+
- run: yarn install --frozen-lockfile
33+
- run: yarn build
34+

0 commit comments

Comments
 (0)