refactor: forgejo deploy - use dedicated Forgejo SSH key
All checks were successful
Deploy Blog / deploy (push) Successful in 15s
All checks were successful
Deploy Blog / deploy (push) Successful in 15s
This commit is contained in:
parent
88a659f51c
commit
b74f5ea941
1 changed files with 1 additions and 43 deletions
|
@ -1,45 +1,3 @@
|
||||||
# name: Deploy Blog
|
|
||||||
# on:
|
|
||||||
# push:
|
|
||||||
# branches: [main]
|
|
||||||
|
|
||||||
# jobs:
|
|
||||||
# deploy:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# container:
|
|
||||||
# image: node:18
|
|
||||||
# volumes:
|
|
||||||
# - /var/www/systemsobscure.blog:/output
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v3
|
|
||||||
# - run: npm install
|
|
||||||
# - run: npm run build:posts
|
|
||||||
# - run: npm run build
|
|
||||||
# - name: Deploy files
|
|
||||||
# run: |
|
|
||||||
# mkdir -p /output
|
|
||||||
# rm -rf /output/*
|
|
||||||
# cp -r dist/* /output/
|
|
||||||
|
|
||||||
# # jobs:
|
|
||||||
# deploy:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# container: node:18
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# - run: npm install
|
|
||||||
# - run: npm run build:posts
|
|
||||||
# - run: npm run build
|
|
||||||
|
|
||||||
# - name: Deploy via SSH
|
|
||||||
# run: |
|
|
||||||
# echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/ssh_key
|
|
||||||
# chmod 600 /tmp/ssh_key
|
|
||||||
# ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@localhost "rm -rf /var/www/systemsobscure.blog/*"
|
|
||||||
# scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* thomas@localhost:/var/www/systemsobscure.blog/
|
|
||||||
# rm /tmp/ssh_key
|
|
||||||
|
|
||||||
name: Deploy Blog
|
name: Deploy Blog
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -53,7 +11,7 @@ jobs:
|
||||||
- name: Create dummy file and deploy
|
- name: Create dummy file and deploy
|
||||||
run: |
|
run: |
|
||||||
echo "test content" > test.txt
|
echo "test content" > test.txt
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/ssh_key
|
echo "${{ secrets.SSH_FORGEJO_KEY }}" > /tmp/ssh_key
|
||||||
chmod 600 /tmp/ssh_key
|
chmod 600 /tmp/ssh_key
|
||||||
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@116.203.113.18 "bash -c 'rm -rf /var/www/systemsobscure.blog/*'"
|
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@116.203.113.18 "bash -c 'rm -rf /var/www/systemsobscure.blog/*'"
|
||||||
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no test.txt thomas@116.203.113.18:/var/www/systemsobscure.blog/
|
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no test.txt thomas@116.203.113.18:/var/www/systemsobscure.blog/
|
||||||
|
|
Loading…
Add table
Reference in a new issue