Skip to content

Commit

Permalink
Create workflow.yml (#36)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
NkwaTambe authored Apr 25, 2024
1 parent 9ecf366 commit 0b8974f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches:
- '*'

pull_request:
branches:
- '*'

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: yarn install --frozen-lockfile
- run: yarn build

0 comments on commit 0b8974f

Please sign in to comment.