-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 1.02 KB
/
deploy-blog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Deploy Blog
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js 20
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- name: Deploy to server
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
run: |
sshpass -p ${SSH_PASSWORD} ssh -o StrictHostKeyChecking=no ${SSH_USERNAME}@${SSH_HOST} "
cd ~
rm -rf validatorinfo-blog
git clone https://github.com/citizenweb3/validatorinfo-blog.git
cd validatorinfo-blog
~/.rbenv/shims/bundle install
~/.rbenv/shims/bundle exec jekyll build
nohup ~/.rbenv/shims/bundle exec jekyll serve &> jekyll.log &
"