name: Deploy Static Site on: push: branches: - master jobs: build and deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: pnpm/setup@v3 with: cache: true version: ^12.0.0 runtime: node@24 - run: node --version - run: pnpm build - name: List files in the repository run: | ls ${{ gitea.workspace }} - name: List files in dist run: | ls ${{ gitea.workspace }}/dist - name: Install SSH key uses: webfactory/ssh-agent@v0.10.0 with: ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }} - name: Add VPS to known_hosts run: | mkdir -p ~/.ssh ssh-keyscan \ -p "${{ secrets.DEPLOY_SSH_PORT }}" \ "${{ secrets.DEPLOY_HOST }}" \ >> ~/.ssh/known_hosts - name: Upload build run: | rsync -az --delete \ -e "ssh -p ${{ secrets.DEPLOY_SSH_PORT }}" \ dist/ \ "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/opt/static-site/.incoming/"