Merge pull request #2 from cybercongress/tx_service #42
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
name: build_cyb | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_app: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.14.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Set environment variable with commit SHA | |
run: | | |
echo "COMMIT_SHA=${{ github.sha }}" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
cd ./front | |
yarn install | |
- name: Build app | |
run: | | |
cd ./front | |
yarn build | |
- name: Verify build directory | |
run: | | |
ls -la | |
echo "Contents of front directory:" | |
ls -al ./front/dist | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }} | |
BRANCH: build | |
FOLDER: ./front/dist | |
CLEAN: true |