Skip to content

Commit

Permalink
use command to ssh in deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Isak-Kallini committed Feb 23, 2025
1 parent c95d813 commit da5af82
Showing 1 changed file with 9 additions and 26 deletions.
35 changes: 9 additions & 26 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,12 @@ jobs:
with:
files: build.zip

- name: Copy build to server
uses: Wandalen/wretry.action@master
with:
action: appleboy/[email protected]
attempt_limit: 15
with: |
host: web-beta
proxy_host: hyacinth.blossom.dsek.se
username: web-ci
key: ${{ secrets.DEPLOY_SSH_KEY }}
proxy_key: ${{ secrets.DEPLOY_SSH_KEY }}
source: "build.zip"
target: /var/www
- name: Deploy website on server
uses: Wandalen/wretry.action@master
with:
action: appleboy/[email protected]
attempt_limit: 15
with: |
host: web-beta
proxy_host: hyacinth.blossom.dsek.se
username: web-ci
key: ${{ secrets.DEPLOY_SSH_KEY }}
proxy_key: ${{ secrets.DEPLOY_SSH_KEY }}
script_path: ./prod/deploy-script.sh
- name: Copy files to server and deploy
shell: bash
env:
KEY: ${{ secrets.DEPLOY_SSH_KEY }}
run: |
touch key
echo "$DEPLOY_SSH_KEY" > key
if ! scp -i ./key [email protected] build.zip web-ci@web-beta:/var/www "$1"; then $0 "$1"; fi
if ! ssh -i ./key -J [email protected] web-ci@web-beta < ./prod/deploy-script.sh "$1"; then $0 "$1"; fi

0 comments on commit da5af82

Please sign in to comment.