Skip to content

Commit

Permalink
chore: avoid ignoring .kamal/secrets*
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagorodriguez96 committed Oct 18, 2024
1 parent 2af61b0 commit 9f8f508
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,9 @@ jobs:
- name: Expose GitHub Runtime for cache
uses: crazy-max/ghaction-github-runtime@v3

- name: Generate kamal secrets
run: |
cat <<EOT >> .kamal/secrets.${{ inputs.destination }}
RAILS_MASTER_KEY=${{secrets.RAILS_MASTER_KEY}}
DATABASE_URL=${{secrets.DATABASE_URL}}
SECRET_KEY_BASE=${{secrets.SECRET_KEY_BASE}}
EOT
- name: Run deploy command
run: bundle exec kamal deploy -d ${{ inputs.destination }}
env:
RAILS_MASTER_KEY: ${{secrets.RAILS_MASTER_KEY}}
DATABASE_URL: ${{secrets.DATABASE_URL}}
SECRET_KEY_BASE: ${{secrets.SECRET_KEY_BASE}}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
/.env*
!/.env*.erb

/.kamal/secrets*

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
Expand Down
3 changes: 3 additions & 0 deletions .kamal/secrets-common
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RAILS_MASTER_KEY=$RAILS_MASTER_KEY
DATABASE_URL=$DATABASE_URL
SECRET_KEY_BASE=$SECRET_KEY_BASE

0 comments on commit 9f8f508

Please sign in to comment.