add deploy workflow for my-vpn
Some checks failed
Deploy to my-vpn / deploy (push) Failing after 14s
Some checks failed
Deploy to my-vpn / deploy (push) Failing after 14s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
27
.gitea/workflows/deploy-my-vpn.yml
Normal file
27
.gitea/workflows/deploy-my-vpn.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Deploy to my-vpn
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: [linux, x64, server-2]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy via SSH
|
||||
env:
|
||||
VPN_HOST: ${{ secrets.VPN_HOST }}
|
||||
VPN_USER: ${{ secrets.VPN_USER }}
|
||||
VPN_SSH_KEY: ${{ secrets.VPN_SSH_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "$VPN_SSH_KEY" > ~/.ssh/id_ci_runner
|
||||
chmod 600 ~/.ssh/id_ci_runner
|
||||
ssh-keyscan -H "$VPN_HOST" >> ~/.ssh/known_hosts
|
||||
|
||||
ssh -i ~/.ssh/id_ci_runner "$VPN_USER@$VPN_HOST" "cd /srv/ip-ua && git fetch --all && git reset --hard origin/main && bash deploy/my-vpn/deploy.sh"
|
||||
Reference in New Issue
Block a user