update:githubactions #30
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 to Production | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy via SSH | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
passphrase: ${{ secrets.SSH_PASS }} | |
script: | | |
cd ./www/book_log_list | |
pkill -9 ruby | |
git pull origin main | |
RAILS_ENV=production bundle exec rake assets:precompile | |
nohup env RAILS_ENV=production bundle exec puma -C config/puma.rb > puma.log 2>&1 & |