diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index dbfdc2d..303bbf7 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -47,6 +47,24 @@ jobs: deploy: needs: build runs-on: ubuntu-latest + container: + image: debian:stable-slim steps: - - name: Deploy - run: echo "TODO" \ No newline at end of file + - 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 }}/ \ No newline at end of file