add deploy
This commit is contained in:
@@ -47,6 +47,24 @@ jobs:
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: debian:stable-slim
|
||||
steps:
|
||||
- name: Deploy
|
||||
run: echo "TODO"
|
||||
- name: Install tools
|
||||
run: apt-get update && apt-get install -y --no-install-recommends rsync openssh-client ca-certificates
|
||||
|
||||
- name: Download site
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: site
|
||||
path: _site
|
||||
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Rsync to VPS
|
||||
run: rsync -avz --delete _site/ ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:${{ secrets.DEPLOY_PATH }}/
|
||||
Reference in New Issue
Block a user