Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SaveTheAles authored May 28, 2024
1 parent e5532c5 commit 7a8ffa4
Showing 1 changed file with 36 additions and 28 deletions.
64 changes: 36 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
name: CI
on: [push]
name: build_app

on:
push:
branches:
- main

jobs:
build:
name: Build
build_app:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: subrepo cd
run: cd front
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: build # will run `yarn build` command
- name: Test the app
uses: borales/actions-yarn@v4
with:
cmd: test # will run `yarn test` command
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Run test in sub-folder
uses: borales/actions-yarn@v4
with:
cmd: test
dir: 'build' # will run `yarn test` in `frontend` sub folder
- name: Install dependencies
run: |
cd ./front
yarn install
- name: Build ton app
run: |
cd ./front
yarn build
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
BRANCH: build
FOLDER: dist
CLEAN: true

0 comments on commit 7a8ffa4

Please sign in to comment.