Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build assets before running terraform plan so the source code hash ma… #87

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,10 @@ jobs:
- uses: ./.github/actions/setup-languages

- name: Restore asset cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
key: cache-staging-assets
path: |
public/assets

- name: Precompile assets and clean old versions
env:
RAILS_ENV: staging
SECRET_KEY_BASE_DUMMY: 1
run: ./bin/rake assets:precompile && ./bin/rake assets:clean
path: public/assets

- name: Terraform apply
uses: dflook/terraform-apply@v1
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/terraform-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ jobs:
with:
path: terraform

- uses: ./.github/actions/setup-languages
- name: Use asset cache
uses: actions/cache@v4
with:
key: cache-staging-assets
path: public/assets
- name: Precompile assets and clean old versions
env:
RAILS_ENV: staging
SECRET_KEY_BASE_DUMMY: 1
run: ./bin/rake assets:precompile && ./bin/rake assets:clean

- name: terraform plan
uses: dflook/terraform-plan@v1
env:
Expand Down
Loading