diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml new file mode 100644 index 0000000..8661d66 --- /dev/null +++ b/.github/workflows/deploy-production.yml @@ -0,0 +1,35 @@ +name: Deploy to Production + +on: + workflow_dispatch: + push: + branches: + - version-15 + +concurrency: + group: deploy-production + cancel-in-progress: true + +jobs: + deploy: + runs-on: ubuntu-latest + timeout-minutes: 90 + + steps: + - name: Deploy to Production + uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1.2.5 + with: + host: ${{ secrets.PRODUCTION_HOST }} + username: ${{ secrets.PRODUCTION_USERNAME }} + key: ${{ secrets.PRODUCTION_KEY }} + port: 22 + command_timeout: 30m + script_stop: true + script: | + set -euxo pipefail + cd /home/frappe/mobile_app_ionic + git fetch upstream version-15 + git checkout version-15 + git reset --hard upstream/version-15 + yarn install --frozen-lockfile + yarn build