mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-16 06:24:12 +02:00
Merge pull request #123 from cisagov/ik/stable-uswds-assets
Add asset compilation and collection before deploy
This commit is contained in:
commit
784be2b279
3 changed files with 17 additions and 1 deletions
9
.github/workflows/deploy.yaml
vendored
9
.github/workflows/deploy.yaml
vendored
|
@ -24,6 +24,15 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Compile USWDS assets
|
||||||
|
working-directory: ./src
|
||||||
|
run: |
|
||||||
|
docker compose run node npm install &&
|
||||||
|
docker compose run node npx gulp copyAssets &&
|
||||||
|
docker compose run node npx gulp compile
|
||||||
|
- name: Collect static assets
|
||||||
|
working-directory: ./src
|
||||||
|
run: docker compose run app python manage.py collectstatic
|
||||||
- name: Deploy to cloud.gov sandbox
|
- name: Deploy to cloud.gov sandbox
|
||||||
uses: 18f/cg-deploy-action@main
|
uses: 18f/cg-deploy-action@main
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -36,9 +36,15 @@ Binding the database in `manifest-<ENVIRONMENT>.json` automatically inserts the
|
||||||
|
|
||||||
# Deploy
|
# Deploy
|
||||||
|
|
||||||
We have two environments: `unstable` and `staging`. Developers can deploy locally to unstable whenever they want. However, only our CD service can deploy to `staging`, and it does so on every commit to `main`. This is to ensure that we have a "golden" environment to point to, and can still test things out in an unstable space. To deploy locally to `unstable`:
|
We have two environments: `unstable` and `staging`. Developers can deploy locally to unstable whenever they want. However, only our CD service can deploy to `staging`, and it does so on every commit to `main`. This is to ensure that we have a "golden" environment to point to, and can still test things out in an unstable space. You should make sure all of the USWDS assets are compiled and collected before deploying to unstable. To deploy locally to `unstable`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Compile and collect the assets
|
||||||
|
docker-compose run node npx gulp compile
|
||||||
|
docker-compose run node npx gulp copyAssets
|
||||||
|
docker-compose run app ./manage.py collectstatic
|
||||||
|
|
||||||
|
# Deploy to unstable
|
||||||
cf target -o cisa-getgov-prototyping -s unstable
|
cf target -o cisa-getgov-prototyping -s unstable
|
||||||
cf push getgov-unstable -f ops/manifests/manifest-unstable.yaml
|
cf push getgov-unstable -f ops/manifests/manifest-unstable.yaml
|
||||||
cf run-task getgov-unstable --command 'python manage.py migrate' --name migrate
|
cf run-task getgov-unstable --command 'python manage.py migrate' --name migrate
|
||||||
|
|
|
@ -28,6 +28,7 @@ uswds.paths.dist.img = ASSETS_DIR + 'img';
|
||||||
* Add as many as you need
|
* Add as many as you need
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
exports.default = uswds.compile;
|
||||||
exports.init = uswds.init;
|
exports.init = uswds.init;
|
||||||
exports.compile = uswds.compile;
|
exports.compile = uswds.compile;
|
||||||
exports.watch = uswds.watch;
|
exports.watch = uswds.watch;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue