diff --git a/.github/workflows/deploy-acos.yml b/.github/workflows/deploy-acos.yml new file mode 100644 index 00000000..fac1e84b --- /dev/null +++ b/.github/workflows/deploy-acos.yml @@ -0,0 +1,24 @@ +name: deploy-acos +on: + push: + branches: + - keweizhan + +jobs: + build: + name: deploy-acos + runs-on: self-hosted + steps: + - name: ssh + uses: fifsky/ssh-action@master + with: + host: ${{ secrets.STAGING_HOST }} + user: ${{ secrets.STAGING_USERNAME }} + key: ${{ secrets.STAGING_KEY }} + port: ${{ secrets.STAGING_PORT }} + args: "-tt" + command: | + cd /home/deploy/code-workout/ + docker compose pull + docker-compose down + docker-compose up -d diff --git a/.github/workflows/image-build.yml b/.github/workflows/image-build.yml new file mode 100644 index 00000000..9edbed60 --- /dev/null +++ b/.github/workflows/image-build.yml @@ -0,0 +1,32 @@ +name: image-build +on: + push: + branches: + - keweizhan +jobs: + build: + name: code-workout-image + runs-on: ubuntu + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: opendsa/code-workout:latest