.github: deploy to different server
Some checks failed
/ Deploy blog to deuterium (push) Has been cancelled
Some checks failed
/ Deploy blog to deuterium (push) Has been cancelled
Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
0f04ace073
commit
2a8e8eb39c
1 changed files with 6 additions and 6 deletions
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
|
@ -3,10 +3,10 @@ on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Deploy blog to hydrogen
|
name: Deploy blog to deuterium
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
env:
|
env:
|
||||||
MACHINE: hydrogen
|
MACHINE: deuterium
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Go 1.19
|
- name: Setup Go 1.19
|
||||||
id: go
|
id: go
|
||||||
|
@ -45,7 +45,7 @@ jobs:
|
||||||
FILENAME=prose-${TIME}.tar.gz
|
FILENAME=prose-${TIME}.tar.gz
|
||||||
mkdir -p static/css
|
mkdir -p static/css
|
||||||
tar -czf $FILENAME prose static/ styles/ templates/ posts/
|
tar -czf $FILENAME prose static/ styles/ templates/ posts/
|
||||||
echo $FILENAME "github@$MACHINE:/home/github/"
|
echo $FILENAME "www@$MACHINE:/home/www/"
|
||||||
scp -i ~/.ssh/key $FILENAME "github@$MACHINE:/home/github/"
|
scp -i ~/.ssh/key $FILENAME "www@$MACHINE:/home/www/"
|
||||||
ssh -i ~/.ssh/key "github@$MACHINE" "tar -C /var/www/blog -xzf ~/$FILENAME"
|
ssh -i ~/.ssh/key "www@$MACHINE" "tar -C /var/www/prose.nsood.in -xzf ~/$FILENAME"
|
||||||
ssh -i ~/.ssh/key "github@$MACHINE" "sudo systemctl restart prose"
|
ssh -i ~/.ssh/key "www@$MACHINE" "sudo systemctl restart prose"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue