This commit is contained in:
parent
0c4ee2d462
commit
e2f9bbd829
1 changed files with 4 additions and 7 deletions
|
@ -50,14 +50,11 @@ jobs:
|
||||||
container: node:18
|
container: node:18
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: npm install
|
- name: Create dummy file and deploy
|
||||||
- run: npm run build:posts
|
|
||||||
- run: npm run build
|
|
||||||
- name: Deploy via SSH
|
|
||||||
run: |
|
run: |
|
||||||
|
echo "test content" > test.txt
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/ssh_key
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/ssh_key
|
||||||
chmod 600 /tmp/ssh_key
|
chmod 600 /tmp/ssh_key
|
||||||
HOST_IP=$(ip route show default | awk '/default/ {print $3}')
|
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@172.17.0.1 "rm -rf /var/www/systemsobscure.blog/*"
|
||||||
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@$HOST_IP "rm -rf /var/www/systemsobscure.blog/*"
|
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no test.txt thomas@172.17.0.1:/var/www/systemsobscure.blog/
|
||||||
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* thomas@$HOST_IP:/var/www/systemsobscure.blog/
|
|
||||||
rm /tmp/ssh_key
|
rm /tmp/ssh_key
|
||||||
|
|
Loading…
Add table
Reference in a new issue