deploy: add SSH checkout and ensure zapishis-strapi directory exists on VPS
This commit is contained in:
parent
879dcc2d62
commit
c852b95c43
7
.github/workflows/deploy.yml
vendored
7
.github/workflows/deploy.yml
vendored
@ -29,6 +29,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup SSH key
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
@ -36,6 +39,10 @@ jobs:
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -H ${{ secrets.VPS_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Ensure zapishis-strapi directory exists on VPS
|
||||
run: |
|
||||
ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} "mkdir -p /home/${{ secrets.VPS_USER }}/zapishis-strapi"
|
||||
|
||||
- name: Copy docker-compose.yml to VPS via SCP
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user