Merge pull request #2067 from cisagov/rjm/2056-domains-table-link #259
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
# This workflow runs on pushes to main | |
# any merge/push to main will result in development being deployed | |
name: Build and deploy development for release | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- '.gitignore' | |
branches: | |
- main | |
jobs: | |
deploy-development: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Compile USWDS assets | |
working-directory: ./src | |
run: | | |
docker compose run node bash -c "\ | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash && \ | |
export NVM_DIR=\"\$HOME/.nvm\" && \ | |
[ -s \"\$NVM_DIR/nvm.sh\" ] && \. \"\$NVM_DIR/nvm.sh\" && \ | |
[ -s \"\$NVM_DIR/bash_completion\" ] && \. \"\$NVM_DIR/bash_completion\" && \ | |
nvm install 21.7.3 && \ | |
nvm use 21.7.3 && \ | |
npm install && \ | |
npx gulp copyAssets && \ | |
npx gulp compile" | |
- name: Collect static assets | |
working-directory: ./src | |
run: docker compose run app python manage.py collectstatic --no-input | |
- name: Deploy to cloud.gov sandbox | |
uses: 18f/cg-deploy-action@main | |
env: | |
DEPLOY_NOW: thanks | |
with: | |
cf_username: ${{ secrets.CF_DEVELOPMENT_USERNAME }} | |
cf_password: ${{ secrets.CF_DEVELOPMENT_PASSWORD }} | |
cf_org: cisa-dotgov | |
cf_space: development | |
push_arguments: "-f ops/manifests/manifest-development.yaml" | |
- name: Run Django migrations | |
uses: cloud-gov/cg-cli-tools@main | |
with: | |
cf_username: ${{ secrets.CF_DEVELOPMENT_USERNAME }} | |
cf_password: ${{ secrets.CF_DEVELOPMENT_PASSWORD }} | |
cf_org: cisa-dotgov | |
cf_space: development | |
cf_command: "run-task getgov-development --command 'python manage.py migrate' --name migrate" |