This commit is contained in:
@@ -19,13 +19,13 @@ jobs:
|
|||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
ssh-keyscan -H ${{ secrets.DEPLOY_SERVER }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.DEPLOY_PORT }} -H ${{ secrets.DEPLOY_SERVER }} >> ~/.ssh/known_hosts
|
||||||
eval "$(ssh-agent -s)"
|
eval "$(ssh-agent -s)"
|
||||||
ssh-add ~/.ssh/id_ed25519
|
ssh-add ~/.ssh/id_ed25519
|
||||||
|
|
||||||
- name: Deploy via Git Pull and Rsync
|
- name: Deploy via Git Pull and Rsync
|
||||||
run: |
|
run: |
|
||||||
ssh -p 2222 ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_SERVER }} "
|
ssh -p ${{ secrets.DEPLOY_PORT }} ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_SERVER }} "
|
||||||
cd ${{ secrets.DEPLOY_PATH }} &&
|
cd ${{ secrets.DEPLOY_PATH }} &&
|
||||||
git fetch origin &&
|
git fetch origin &&
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Restart docker container
|
- name: Restart docker container
|
||||||
run: |
|
run: |
|
||||||
ssh -p 2222 ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_SERVER }} "
|
ssh -p ${{ secrets.DEPLOY_PORT }} ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_SERVER }} "
|
||||||
cd ${{ secrets.DEPLOY_PATH }} &&
|
cd ${{ secrets.DEPLOY_PATH }} &&
|
||||||
docker compose down &&
|
docker compose down &&
|
||||||
docker compose up --build -d
|
docker compose up --build -d
|
||||||
|
|||||||
Reference in New Issue
Block a user