Skip to content

Try catch yarn ci error #199

Try catch yarn ci error

Try catch yarn ci error #199

name: github-actions
on: [push]
jobs:
Test:
runs-on: ubuntu-latest
env:
AIDBOX_LICENSE_KEY_TESTS: ${{ secrets.AIDBOX_LICENSE_KEY_TESTS }}
AIDBOX_LICENSE_ID_TESTS: ${{ secrets.AIDBOX_LICENSE_ID_TESTS }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install deps
run: yarn install --verbose
- run: yarn run typecheck
# - run: ./run_test.sh
- run: yarn build:web
Release:
needs: Test
runs-on: ubuntu-latest
env:
BUILD_IMAGE: bedasoftware/sdc-ide:master
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install deps
run: yarn
- run: yarn build:web
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- run: docker run --rm --privileged tonistiigi/binfmt --install all
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: >-
docker buildx build --platform linux/arm64,linux/amd64
--push -t ${{ env.BUILD_IMAGE }} .
Deploy:
needs: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Restart
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script_stop: true
script: |
cd ~/web
make restart
echo Current branch is ${{ github.ref }}