From cfe292cec702b95b23d4007eb6debac90a0b97ab Mon Sep 17 00:00:00 2001 From: evan Date: Mon, 21 Apr 2025 14:54:42 -0700 Subject: [PATCH] deploy to main.openfront.dev on main commit --- .github/workflows/deploy.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fc50835d9..32ff5ec73 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,12 +25,16 @@ on: required: false default: "" type: string + push: + branches: + - main jobs: deploy: - name: Deploy to ${{ inputs.target_environment }} + # Use different logic based on event type + name: Deploy to ${{ github.event_name == 'workflow_dispatch' && inputs.target_environment || 'staging' }} runs-on: ubuntu-latest - environment: ${{ inputs.target_environment }} + environment: ${{ github.event_name == 'workflow_dispatch' && inputs.target_environment || 'staging' }} steps: - uses: actions/checkout@v4 @@ -44,7 +48,13 @@ jobs: echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa ssh-keyscan -H ${{ secrets.SERVER_HOST_STAGING }} >> ~/.ssh/known_hosts - cat >.env.${{ inputs.target_environment }} <.env.$TARGET_ENV <