-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy letsencrypt and docker compose file to vm in deploy docker script
- Loading branch information
David Mang
committed
Aug 29, 2024
1 parent
3b61201
commit d40adfc
Showing
1 changed file
with
20 additions
and
8 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 |
---|---|---|
|
@@ -33,19 +33,31 @@ jobs: | |
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Copy Files to Server | ||
uses: appleboy/ssh-action@v1.0.3 | ||
- name: Copy Docker Compose File From Repo to VM Host | ||
uses: appleboy/scp-action@v0.1.7 | ||
with: | ||
host: ${{ secrets.SERVER_DOMAIN }} | ||
username: ${{ secrets.SERVER_USER }} | ||
key: ${{ secrets.SSH_KEY }} | ||
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: | | ||
scp -o StrictHostKeyChecking=no ./compose.yml ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_DOMAIN }}:~/compose.yml | ||
scp -o StrictHostKeyChecking=no -r ./letsencrypt ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_DOMAIN }}:~/letsencrypt | ||
source: "./compose.yml" | ||
target: /home/${{ secrets.SERVER_USER }} | ||
|
||
- name: Copy Letsencrypt File From Repo 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: "./letsencrypt" | ||
target: /home/${{ secrets.SERVER_USER }} | ||
|
||
- name: Set Up Environment Variables | ||
uses: appleboy/[email protected] | ||
|