Update deploy info #74
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 | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Deploy: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: 1 | |
RAILS_ENV: production | |
KAMAL_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_KEY }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.2 | |
bundler-cache: true | |
- name: Set up Docker Buildx for cache | |
uses: docker/setup-buildx-action@v3 | |
- name: Expose GitHub Runtime for cache | |
uses: crazy-max/ghaction-github-runtime@v3 | |
- name: Set Rails Master Key | |
run: echo ${{ secrets.RAILS_MASTER_KEY}} >> config/credentials/production.key | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Deploy command | |
run: bundle exec kamal deploy |