This commit is contained in:
parent
6d8c9fa80a
commit
a38a07aab8
1 changed files with 23 additions and 12 deletions
|
@ -24,20 +24,31 @@ jobs:
|
||||||
- name: Build Hugo Site
|
- name: Build Hugo Site
|
||||||
run: hugo
|
run: hugo
|
||||||
|
|
||||||
- name: Set up SSH Key
|
# - name: Set up SSH Key
|
||||||
run: |
|
# run: |
|
||||||
mkdir -p ~/.ssh
|
# mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_ed25519
|
# echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_ed25519
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
# chmod 600 ~/.ssh/id_ed25519
|
||||||
|
|
||||||
- name: Deploy to SSH Host
|
# - name: Deploy to SSH Host
|
||||||
run: |
|
# run: |
|
||||||
rsync -avz --delete -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" ./public/ wiki-deploy@${{ secrets.SSH_HOST }}:/var/www/wiki.lunivity.com/
|
# rsync -avz --delete -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" ./public/ wiki-deploy@${{ secrets.SSH_HOST }}:/var/www/wiki.lunivity.com/
|
||||||
|
|
||||||
- name: Remove SSH Key
|
# - name: Remove SSH Key
|
||||||
run: |
|
# run: |
|
||||||
rm -rf ~/.ssh
|
# rm -rf ~/.ssh
|
||||||
echo "SSH Key removed."
|
# echo "SSH Key removed."
|
||||||
|
|
||||||
|
- uses: https://github.com/mschmitt/rsync-with-ssh-agent@v2
|
||||||
|
with:
|
||||||
|
SSH_KEY: ${{ secrets.SSH_PRIV_KEY }}
|
||||||
|
SSH_PASSPHRASE: ${{ secrets.SSH_PASSPHRASE }}
|
||||||
|
SSH_USER: wiki-deploy
|
||||||
|
SSH_HOST: ${{ secrets.SSH_HOST }}
|
||||||
|
SSH_PORT: ${{ secrets.SSH_PORT }}
|
||||||
|
RSYNC_LOCAL_PATH: './public'
|
||||||
|
RSYNC_REMOTE_PATH: '/var/www/wiki.lunivity.com/'
|
||||||
|
RSYNC_OPTIONS: '--recursive --delete --delete-before --verbose --dry-run'
|
||||||
|
|
||||||
# - name: Deploy to SSH Host
|
# - name: Deploy to SSH Host
|
||||||
# uses: https://github.com/Creepios/sftp-action@v1.0.5
|
# uses: https://github.com/Creepios/sftp-action@v1.0.5
|
||||||
|
|
Loading…
Reference in a new issue