Skip to content

Merge pull request #45 from sarahcssiqueira/dependabot/bundler/puma-6… #22

Merge pull request #45 from sarahcssiqueira/dependabot/bundler/puma-6…

Merge pull request #45 from sarahcssiqueira/dependabot/bundler/puma-6… #22

Workflow file for this run

name: Deploy to DigitalOcean
on:
push:
branches:
- main
tags:
- '*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to DigitalOcean
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.DO_USERNAME }}@${{ secrets.DO_SERVER_IP }} << 'EOF'
sudo git config --global --add safe.directory /home/rails/pet-tag-generator
cd /home/rails/pet-tag-generator
git fetch --tags
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
bundle install
rails db:migrate
sudo systemctl restart pettag
EOF