-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
191d053
commit 4a74898
Showing
1 changed file
with
15 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,23 @@ on: | |
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: | ||
environment: | ||
name: ${{ inputs.environment }} | ||
url: '${{ vars.CLIENT_HOST }}' | ||
steps: | ||
- name: SSH to VM and Execute Docker-Compose Down | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ vars.VM_HOST }} | ||
username: ${{ vars.VM_USERNAME }} | ||
key: ${{ secrets.VM_SSH_PRIVATE_KEY }} | ||
proxy_host: ${{ vars.DEPLOYMENT_GATEWAY_HOST }} | ||
proxy_username: ${{ vars.DEPLOYMENT_GATEWAY_USER }} | ||
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} | ||
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }} | ||
script: | | ||
docker compose -f docker-compose.prod.yml --env-file=.env.prod down --remove-orphans --rmi all | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
|
@@ -67,19 +80,6 @@ jobs: | |
source: "master.cf" | ||
target: /home/${{ vars.VM_USERNAME }}/postfix-config/ | ||
|
||
- name: Copy thesis-track-backup.sh to VM Host | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ vars.VM_HOST }} | ||
username: ${{ vars.VM_USERNAME }} | ||
key: ${{ secrets.VM_SSH_PRIVATE_KEY }} | ||
proxy_host: ${{ vars.DEPLOYMENT_GATEWAY_HOST }} | ||
proxy_username: ${{ vars.DEPLOYMENT_GATEWAY_USER }} | ||
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} | ||
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }} | ||
source: "thesis-track-backup.sh" | ||
target: /home/${{ vars.VM_USERNAME }} | ||
|
||
- name: SSH to VM and create .env.prod | ||
uses: appleboy/[email protected] | ||
with: | ||
|
@@ -150,6 +150,4 @@ jobs: | |
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} | ||
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }} | ||
script: | | ||
docker compose -f docker-compose.prod.yml --env-file=.env.prod pull client server | ||
docker compose -f docker-compose.prod.yml --env-file=.env.prod restart postfix | ||
docker compose -f docker-compose.prod.yml --env-file=.env.prod up -d | ||
docker compose -f docker-compose.prod.yml --env-file=.env.prod up --pull=always -d |