@@ -8,13 +8,15 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: [linux, amd64]
|
runs-on: [linux, amd64]
|
||||||
|
env:
|
||||||
|
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
||||||
steps:
|
steps:
|
||||||
- name: Setup SSH key for git
|
- name: Setup SSH key for git
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
|
echo "$DEPLOY_KEY" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
ssh-keyscan -H 192.168.1.22 >> ~/.ssh/known_hosts
|
ssh-keyscan -H 192.168.1.22 >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
@@ -24,7 +26,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup SSH key for deploy
|
- name: Setup SSH key for deploy
|
||||||
run: |
|
run: |
|
||||||
ssh-keyscan -H micecola.top >> ~/.ssh/known_hosts
|
ssh-keyscan -H micecola.top >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
|
|
||||||
- name: Deploy to server
|
- name: Deploy to server
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user