Update .github/workflows/deploy.yml
Build & Deploy to Pages / build-deploy (push) Successful in 4m10s
Build & Deploy to Pages / build-deploy (push) Successful in 4m10s
This commit is contained in:
@@ -47,23 +47,23 @@ jobs:
|
|||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Install rsync + ssh client
|
- name: Install rsync + ssh client
|
||||||
run: apt-get update -qq && apt-get install -y -qq rsync openssh-client
|
run: apt-get update -qq && apt-get install -y -qq rsync openssh-client
|
||||||
|
|
||||||
- name: Configure SSH
|
- name: Configure SSH
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
|
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
|
||||||
chmod 600 ~/.ssh/deploy_key
|
chmod 600 ~/.ssh/deploy_key
|
||||||
ssh-keyscan -H "${{ secrets.DEPLOY_HOST }}" >> ~/.ssh/known_hosts
|
ssh-keyscan -H "${{ secrets.DEPLOY_HOST }}" >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
- name: Ensure destination folder exists
|
- name: Ensure destination folder exists
|
||||||
run: |
|
run: |
|
||||||
ssh -i ~/.ssh/deploy_key deploy@${{ secrets.DEPLOY_HOST }} \
|
ssh -i ~/.ssh/deploy_key deploy@${{ secrets.DEPLOY_HOST }} \
|
||||||
"mkdir -p /srv/sites/${{ env.APP_FOLDER }} && chmod 755 /srv/sites/${{ env.APP_FOLDER }}"
|
"mkdir -p /srv/sites/${{ env.APP_FOLDER }} && chmod 755 /srv/sites/${{ env.APP_FOLDER }}"
|
||||||
|
|
||||||
- name: Upload site
|
- name: Upload site
|
||||||
run: |
|
run: |
|
||||||
rsync -avz --delete \
|
rsync -avz --delete \
|
||||||
-e "ssh -i ~/.ssh/deploy_key" \
|
-e "ssh -i ~/.ssh/deploy_key" \
|
||||||
./dist/ deploy@${{ secrets.DEPLOY_HOST }}:/srv/sites/${{ env.APP_FOLDER }}/
|
./dist/ deploy@${{ secrets.DEPLOY_HOST }}:/srv/sites/${{ env.APP_FOLDER }}/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user