ci: trigger deploy after manifest regeneration #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Themes | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to VPS | |
| env: | |
| SSH_KEY: ${{ secrets.HETZNER_SSH_KEY }} | |
| HOST: ${{ secrets.HETZNER_HOST }} | |
| USER: ${{ secrets.HETZNER_USER }} | |
| KNOWN_HOSTS: ${{ secrets.HETZNER_KNOWN_HOSTS }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts | |
| chmod 600 ~/.ssh/known_hosts | |
| echo "$SSH_KEY" > /tmp/deploy_key | |
| chmod 600 /tmp/deploy_key | |
| ssh -i /tmp/deploy_key -o StrictHostKeyChecking=yes \ | |
| "$USER@$HOST" \ | |
| 'git -C /opt/kova/themes/data pull --ff-only' | |
| rm /tmp/deploy_key |