task: adding cache #7
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 | |
concurrency: | |
group: production | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
DOCKER_BUILDKIT: 1 | |
GO_ENV: production | |
KAMAL_REGISTRY_USERNAME: ${{ secrets.KAMAL_REGISTRY_USERNAME }} | |
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }} | |
PRODUCTION_SERVER_IP: ${{ secrets.PRODUCTION_SERVER_IP }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.0 | |
bundler-cache: true | |
- run: gem install kamal -v 1.8.3 | |
- uses: webfactory/ssh-agent@v0.9.0 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- uses: docker/setup-buildx-action@v3 | |
- name: Expose GitHub Runtime for cache | |
uses: crazy-max/ghaction-github-runtime@v3 | |
- run: kamal registry login | |
- run: kamal redeploy |