This repository was archived by the owner on Mar 14, 2025. It is now read-only.
try github actions with kamal #1
Workflow file for this run
This file contains hidden or 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 Digital Ocean | |
| permissions: | |
| id-token: write | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - dl/kamal-2-test | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| environment: staging | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| env: | |
| BUNDLE_GEMFILE: ./Gemfile | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.DROPLET_SSH_PRIVATE_KEY }} | |
| - name: Deploy with Kamal | |
| env: | |
| KAMAL_HOST: ${{ secrets.DROPLET_IP }} | |
| KAMAL_REGISTRY_USERNAME: ${{ github.actor }} | |
| KAMAL_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
| SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }} | |
| AXIOM_API_KEY: ${{ secrets.AXIOM_API_KEY }} | |
| DO_TOKEN: ${{ secrets.DO_TOKEN }} | |
| SPACES_REGION: ${{ secrets.SPACES_REGION }} | |
| SPACES_BUCKET_NAME: ${{ secrets.SPACES_BUCKET_NAME }} | |
| SPACES_BUCKET_CONTENT: ${{ secrets.SPACES_BUCKET_CONTENT }} | |
| SPACES_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY_ID }} | |
| SPACES_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_ACCESS_KEY }} | |
| RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
| DOCKER_BUILDKIT: 1 | |
| run: | | |
| ./bin/kamal deploy |