Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed May 16, 2024
1 parent 5a61be0 commit 4e63d75
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:

- name: Send deployment files to remote server
run: |
mkdir -p ./$GITHUB_JOB_ID
cp -r ./app ./$GITHUB_JOB_ID
cp ./docker-compose.yml ./$GITHUB_JOB_ID/docker-compose.yml
cp ./Dockerfile ./$GITHUB_JOB_ID/Dockerfile
cp ./pyproject.toml ./$GITHUB_JOB_ID/pyproject.toml
scp -i ${{ secrets.CI_DEPLOY_USER_SSH_PRIVATE_KEY }} -o StrictHostKeyChecking=no -r ./$GITHUB_JOB_ID ${{ secrets.CI_DEPLOY_USER }}@${{ secrets.CI_DEPLOY_HOST }}:/home/${{ secrets.CI_DEPLOY_USER }}/$GITHUB_JOB_ID
mkdir -p ./${{ env.GITHUB_JOB_ID }}
cp -r ./app ./${{ env.GITHUB_JOB_ID }}
cp ./docker-compose.yml ./${{ env.GITHUB_JOB_ID }}/docker-compose.yml
cp ./Dockerfile ./${{ env.GITHUB_JOB_ID }}/Dockerfile
cp ./pyproject.toml ./${{ env.GITHUB_JOB_ID }}/pyproject.toml
scp -i ${{ secrets.CI_DEPLOY_USER_SSH_PRIVATE_KEY }} -o StrictHostKeyChecking=no -r ./${{ env.GITHUB_JOB_ID }} ${{ secrets.CI_DEPLOY_USER }}@${{ secrets.CI_DEPLOY_HOST }}:/home/${{ secrets.CI_DEPLOY_USER }}/${{ env.GITHUB_JOB_ID }}
- name: Execute server commands for deploy
uses: appleboy/ssh-action@master
Expand All @@ -54,10 +54,10 @@ jobs:
username: ${{ secrets.CI_DEPLOY_USER }}
key: ${{ secrets.CI_DEPLOY_USER_SSH_PRIVATE_KEY }}
script: |
cd /home/${{ secrets.CI_DEPLOY_USER }}/$GITHUB_JOB_ID
cd /home/${{ secrets.CI_DEPLOY_USER }}/${{ env.GITHUB_JOB_ID }}
mkdir -p /data/tchapbot
export COMPOSE_FILE=/home/${{ secrets.CI_DEPLOY_USER }}/$GITHUB_JOB_ID/docker-compose.yml
export COMPOSE_FILE=/home/${{ secrets.CI_DEPLOY_USER }}/${{ env.GITHUB_JOB_ID }}/docker-compose.yml
export COMPOSE_PROJECT_NAME=albert-tchapbot
docker compose down
Expand All @@ -66,4 +66,4 @@ jobs:
docker compose up --detach
docker image rm albert/tchapbot:old || true
rm -rf /home/${{ secrets.CI_DEPLOY_USER }}/$GITHUB_JOB_ID
rm -rf /home/${{ secrets.CI_DEPLOY_USER }}/${{ env.GITHUB_JOB_ID }}
18 changes: 9 additions & 9 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:

- name: Send deployment files to remote server
run: |
mkdir -p ./$GITHUB_JOB_ID
cp -r ./app ./$GITHUB_JOB_ID
cp ./docker-compose.yml ./$GITHUB_JOB_ID/docker-compose.yml
cp ./Dockerfile ./$GITHUB_JOB_ID/Dockerfile
cp ./pyproject.toml ./$GITHUB_JOB_ID/pyproject.toml
scp -i ${{ secrets.CI_DEPLOY_USER_SSH_PRIVATE_KEY }} -o StrictHostKeyChecking=no -r ./$GITHUB_JOB_ID ${{ secrets.CI_DEPLOY_USER }}@${{ secrets.CI_DEPLOY_HOST }}:/home/${{ secrets.CI_DEPLOY_USER }}/$GITHUB_JOB_ID
mkdir -p ./${{ env.GITHUB_JOB_ID }}
cp -r ./app ./${{ env.GITHUB_JOB_ID }}
cp ./docker-compose.yml ./${{ env.GITHUB_JOB_ID }}/docker-compose.yml
cp ./Dockerfile ./${{ env.GITHUB_JOB_ID }}/Dockerfile
cp ./pyproject.toml ./${{ env.GITHUB_JOB_ID }}/pyproject.toml
scp -i ${{ secrets.CI_DEPLOY_USER_SSH_PRIVATE_KEY }} -o StrictHostKeyChecking=no -r ./${{ env.GITHUB_JOB_ID }} ${{ secrets.CI_DEPLOY_USER }}@${{ secrets.CI_DEPLOY_HOST }}:/home/${{ secrets.CI_DEPLOY_USER }}/${{ env.GITHUB_JOB_ID }}
- name: Execute server commands for deploy
uses: appleboy/ssh-action@master
Expand All @@ -55,10 +55,10 @@ jobs:
username: ${{ secrets.CI_DEPLOY_USER }}
key: ${{ secrets.CI_DEPLOY_USER_SSH_PRIVATE_KEY }}
script: |
cd /home/${{ secrets.CI_DEPLOY_USER }}/$GITHUB_JOB_ID
cd /home/${{ secrets.CI_DEPLOY_USER }}/${{ env.GITHUB_JOB_ID }}
mkdir -p /data/tchapbot
export COMPOSE_FILE=/home/${{ secrets.CI_DEPLOY_USER }}/$GITHUB_JOB_ID/docker-compose.yml
export COMPOSE_FILE=/home/${{ secrets.CI_DEPLOY_USER }}/${{ env.GITHUB_JOB_ID }}/docker-compose.yml
export COMPOSE_PROJECT_NAME=albert-tchapbot
docker compose down
Expand All @@ -67,4 +67,4 @@ jobs:
docker compose up --detach
docker image rm albert/tchapbot:old || true
rm -rf /home/${{ secrets.CI_DEPLOY_USER }}/$GITHUB_JOB_ID
rm -rf /home/${{ secrets.CI_DEPLOY_USER }}/${{ env.GITHUB_JOB_ID }}

0 comments on commit 4e63d75

Please sign in to comment.