-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5532c5
commit 7a8ffa4
Showing
1 changed file
with
36 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |