Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
vicradon committed Aug 9, 2024
1 parent 71eef60 commit a574499
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/dev-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build_and_upload_image:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.event.repository.fork == false
if: github.event.repository.fork == false
environment: development
env:
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
Expand Down Expand Up @@ -40,26 +40,6 @@ jobs:
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
steps:
- name: Deploy on server
uses: appleboy/[email protected]
with:
host: ${{ env.HOST }}
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}
script: |
bash ./scripts/deploy_app.sh development https://github.com/${{ github.repository}} \
run_docker_container:
runs-on: ubuntu-latest
needs: [build_and_upload_image, update_repo_and_create_env]
if: github.event.repository.fork == false
environment: development
env:
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}

steps:
- name: Create app.env file
uses: ./.github/actions/create-env-action
Expand Down Expand Up @@ -92,6 +72,17 @@ jobs:
source: app.env
target: "~/deployments/development"

run_docker_container:
runs-on: ubuntu-latest
needs: [build_and_upload_image, update_repo_and_create_env]
if: github.event.repository.fork == false
environment: development
env:
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}

steps:
- name: Update app with latest changes
uses: appleboy/[email protected]
with:
Expand Down

0 comments on commit a574499

Please sign in to comment.