Update default.html #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 & | |
" |