Skip to content

Update deploy-blog.yml #57

Update deploy-blog.yml

Update deploy-blog.yml #57

Workflow file for this run

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 &
"