Skip to content

Commit

Permalink
Update bbm_deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RazvanLiviuVarzaru authored Nov 28, 2024
1 parent 5181986 commit 37b08d5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/bbm_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
echo "BB_ENV=DEV" >>$GITHUB_ENV
echo "DEPLOY_PATH=/srv/dev" >>$GITHUB_ENV
echo "ENV_FILE=.env.dev" >>$GITHUB_ENV
echo "PKEY=${{ secrets.BBM_DEV_SSH_PRIVATE_KEY }}"
fi

# PROD environment
Expand All @@ -69,8 +70,6 @@
- uses: actions/checkout@v4

- name: prepare
env:
PKEY: ${{ secrets[format('BBM_{0}_SSH_PRIVATE_KEY', env.BB_ENV)] }}'
if: ${{ env.DEPLOY == 'true' }}
run: |
echo "$PKEY" > test_secret.txt
Expand All @@ -84,12 +83,12 @@
- name: deploy
if: ${{ env.DEPLOY == 'true' }}
run: |
echo "cd ${{ env.DEPLOY_PATH }}/docker-compose/ && ./generate-config.py --env=${BB_ENV,,}"
echo "cd $DEPLOY_PATH/docker-compose/ && ./generate-config.py --env=${BB_ENV,,}"
- name: start stack
if: ${{ env.DEPLOY == 'true' && env.BB_ENV == 'DEV' }}
run: |
echo "cd ${{ env.DEPLOY_PATH }}/docker-compose && docker-compose pull && docker-compose --env-file ${{ env.ENV_FILE }} up -d"
echo "cd $DEPLOY_PATH/docker-compose && docker-compose pull && docker-compose --env-file $ENV_FILE up -d"
- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 37b08d5

Please sign in to comment.