Move rvm install "ruby-2.5.3" #39
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: Run deploy | |
on: | |
push: | |
branches: [production] | |
jobs: | |
deploy: | |
name: Capistrano Deploy to Server | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install SSH key to Server | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
name: github-actions | |
known_hosts: 'random-placeholder-value-replaced-by-keyscan-below' | |
config: | | |
host ktom-tomi.or.id | |
IdentityFile ~/.ssh/github-actions | |
IdentitiesOnly yes | |
ForwardAgent yes | |
- name: Adding Known Hosts | |
run: ssh-keyscan -p "${{ secrets.SSH_PORT }}" "${{ secrets.SSH_HOST }}" >> ~/.ssh/known_hosts | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.5.3 | |
- run: | | |
bundle install | |
- name: Deploy to production | |
run: | | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/github-actions | |
rvm install "ruby-2.5.3" | |
bundle exec cap production deploy --trace |