Skip to content

Commit

Permalink
Merge branch 'hotfix/about'
Browse files Browse the repository at this point in the history
  • Loading branch information
kumankai committed Aug 7, 2024
2 parents b0df525 + e8bdce3 commit c11ecb6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy:
name: "Deploy to VPS"
runs-on: ubuntu-latest
steps:
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deploy-key.pen
chmod 600 ~/.ssh/deploy-key.pem
cat >> ~/.ssh/config <<END
Host my-vps
HostName $SSH_IP
User $SSH_USER
IdentityFile ~/.ssh/deploy-key.pem
StrictHostKeyChecking no
END
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_IP: ${{ secrets.SSH_IP }}

- name: Print project root directory
run: ssh my-vps 'cd ${{ secrets.PROJECT_ROOT }} && pwd'

0 comments on commit c11ecb6

Please sign in to comment.