Skip to content

Commit

Permalink
deploy with bifrost as jumphost
Browse files Browse the repository at this point in the history
  • Loading branch information
Isak-Kallini committed Feb 24, 2025
1 parent d0cfb8e commit 78f12fd
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,23 @@ jobs:
with:
files: build.zip

- name: Copy files to server and deploy
shell: bash
env:
KEY: ${{ secrets.DEPLOY_SSH_KEY }}
run: |
echo "$DEPLOY_SSH_KEY" > ./key
if ! scp -i ./key -oProxyJump=web-ci@hyacinth.blossom.dsek.se build.zip web-ci@web-beta:/var/www "$1"; then $0 "$1"; fi
if ! ssh -i ./key -J web-ci@hyacinth.blossom.dsek.se web-ci@web-beta < ./prod/deploy-script.sh "$1"; then $0 "$1"; fi
- name: Copy build to server
uses: appleboy/scp-action@master
with:
host: web-beta
proxy_host: bifrost.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: appleboy/ssh-action@master
with:
host: web-beta
proxy_host: bifrost.blossom.dsek.se
username: web-ci
key: ${{ secrets.DEPLOY_SSH_KEY }}
proxy_key: ${{ secrets.DEPLOY_SSH_KEY }}
script_path: ./prod/deploy-script.sh

0 comments on commit 78f12fd

Please sign in to comment.