Skip to content

Commit

Permalink
fix: use deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 19, 2023
1 parent 1b59b39 commit 4a5d5ed
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,11 @@ jobs:
with:
name: docusaurus
- name: Upload
shell: bash
run: |
if [ -z "$SSH_KEY" ] || [ -z "$SSH_HOST" ] || [ -z "$SSH_USERNAME" ] || [ -z "$DEPLOY_PATH" ]; then
echo "Missing deploy credentials"
else
# install ssh key
mkdir ~/.ssh
echo "$SSH_KEY" >> ~/.ssh/id_rsa
chmod -R 600 ~/.ssh
# perform copy
rsync -avvz build/ $SSH_USERNAME@$SSH_HOST:$DEPLOY_PATH
fi
env:
SSH_KEY : ${{secrets.DEPLOY_SSH_KEY}}
SSH_HOST : ${{secrets.DEPLOY_SSH_HOST}}
SSH_USERNAME : ${{secrets.DEPLOY_SSH_USERNAME}}
DEPLOY_PATH : ${{secrets.DEPLOY_PATH}}
uses: SamKirkland/web-deploy@v1
with:
target-server: ${{secrets.DEPLOY_SSH_HOST}}
remote-user: ${{secrets.DEPLOY_SSH_USERNAME}}
private-ssh-key: ${{secrets.DEPLOY_SSH_KEY}}
destination-path: ${{secrets.DEPLOY_PATH}}
source-path: build/

0 comments on commit 4a5d5ed

Please sign in to comment.