diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38be9e1f..da50c0d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }} + BRANCH: build + FOLDER: dist + CLEAN: true