HeavyTechRuby/history

View on GitHub
.github/workflows/deploy.yaml

Summary

Maintainability
Test Coverage
name: "deploy"

on:
  workflow_run:
    workflows: [CI]
    branches: [main]
    types: [completed]

jobs:
  deploy:
    if: ${{ github.event.workflow_run.conclusion == 'success' }} 
    runs-on: ubuntu-latest
    steps:
      - name: Cloning repo
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Push to dokku
        uses: dokku/github-action@master
        with:
          branch: "main"
          git_remote_url: ${{ secrets.DOKKU_GIT_REMOTE_URL }} # example: 'ssh://dokku@dokku.me:22/appname'
          ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}