Skip to content

Commit

Permalink
feat: add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawndlwd committed Feb 24, 2024
1 parent 6ae9dc3 commit e896fc7
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,21 @@ jobs:
name: dist
path: dist

- name: Copy dist folder over ssh
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: 22
key: ${{ secrets.DEPLOY_KEY }}
source: 'dist/*'
target: '/var/www/html'
- name: ssh
run: |
apt-get -yq update
apt-get -yqq install ssh
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
ssh-keyscan $SSH_HOST > ~/.ssh/known_hosts
ssh $SSH_USER@$SSH_HOST
# - name: Copy dist folder over ssh
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.SSH_HOST }}
# username: ${{ secrets.SSH_USER }}
# port: 22
# key: ${{ secrets.DEPLOY_KEY }}
# source: 'dist/*'
# target: '/var/www/html'

0 comments on commit e896fc7

Please sign in to comment.