Update README.md #234
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: 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 --network-concurrency 1 | |
- 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 install --network-concurrency 1 | |
- 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 }} |