diff --git a/build-dev.yml b/build-dev.yml new file mode 100644 index 0000000..957b23d --- /dev/null +++ b/build-dev.yml @@ -0,0 +1,46 @@ +name: Build Dev instance + +on: + push: + branches: ["develop", "Develop"] + pull_request: + branches: ["develop", "Develop"] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v3 + + - name: login to gitea registry + uses: docker/login-action@v3 + with: + registry: ${{ gitea.server_url }} + username: ${{ gitea.actor }} + password: ${{ secrets.GITEA }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + engineering.sanya.gay/pluralflux/pluralflux-dev:latest + + - name: Deploy bot + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + port: 22 + script: | + cd ${{ secrets.BOT_DIRECTORY }} + docker compose up -d pluralflux-dev