This commit is contained in:
parent
1879182fd0
commit
7ac6436352
@ -35,14 +35,14 @@ jobs:
|
|||||||
- name: Create tarfile
|
- name: Create tarfile
|
||||||
run: tar -cf website.tar -C public .
|
run: tar -cf website.tar -C public .
|
||||||
|
|
||||||
- name: Setup ssh
|
# - name: Setup ssh
|
||||||
run: |
|
# run: |
|
||||||
mkdir -p /home/runner/.ssh
|
# mkdir -p /home/runner/.ssh
|
||||||
ssh-keyscan ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts
|
# ssh-keyscan ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts
|
||||||
echo "${{ secrets.SSH_KEY }}" > /home/runner/.ssh/id_deployer
|
# echo "${{ secrets.SSH_KEY }}" > /home/runner/.ssh/id_deployer
|
||||||
chmod 600 /home/runner/.ssh/id_deployer
|
# chmod 600 /home/runner/.ssh/id_deployer
|
||||||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
# ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
||||||
ssh-add /home/runner/.ssh/id_deployer
|
# ssh-add /home/runner/.ssh/id_deployer
|
||||||
|
|
||||||
- name: Deploy to server
|
- name: Deploy to server
|
||||||
uses: https://github.com/appleboy/scp-action@master
|
uses: https://github.com/appleboy/scp-action@master
|
||||||
@ -54,6 +54,9 @@ jobs:
|
|||||||
target: /tmp/
|
target: /tmp/
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: echo "rm -r ${{ WEB_DIR }}/*"
|
||||||
|
|
||||||
- name: Extract archive (test)
|
- name: Extract archive (test)
|
||||||
uses: https://github.com/appleboy/ssh-action@master
|
uses: https://github.com/appleboy/ssh-action@master
|
||||||
with:
|
with:
|
||||||
@ -61,7 +64,7 @@ jobs:
|
|||||||
username: ${{ secrets.SSH_USER }}
|
username: ${{ secrets.SSH_USER }}
|
||||||
key: ${{ secrets.SSH_KEY }}
|
key: ${{ secrets.SSH_KEY }}
|
||||||
#script: rm -r ${{ WEB_DIR }}/* && tar -xvf /tmp/website.tar --directory ${{ WEB_DIR }}/ && rm /tmp/website.tar
|
#script: rm -r ${{ WEB_DIR }}/* && tar -xvf /tmp/website.tar --directory ${{ WEB_DIR }}/ && rm /tmp/website.tar
|
||||||
script: rm -r ${{ WEB_DIR }}/*
|
script: "rm -r ${{ WEB_DIR }}/*"
|
||||||
|
|
||||||
|
|
||||||
# - name: Create release
|
# - name: Create release
|
||||||
|
Loading…
Reference in New Issue
Block a user