diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2b7810c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy shapes.activitypods.org + +on: + push: + branches: [master] + # Allows you to run this workflow manually from the Actions tab on GitHub. + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Wait for publish workflow to be completed + uses: kamilchodola/wait-for-workflow-action@1.1.0 + with: + GITHUB_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }} + workflow_id: "publish.yml" + org_name: "activitypods" + repo_name: "shapes" + + - name: Executing remote SSH command + uses: appleboy/ssh-action@v1.0.3 + with: + host: shapes.activitypods.org + username: ${{ secrets.USERNAME }} + key: ${{ secrets.PRIVATE_KEY }} + port: 22 + script: | + cd apps + docker system prune --force + docker compose build shapes + docker compose up -d shapes