mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +02:00
commit
5e4c44a444
27 changed files with 951 additions and 15 deletions
42
.github/workflows/deploy.yaml
vendored
Normal file
42
.github/workflows/deploy.yaml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: Build and deploy
|
||||
|
||||
# This workflow runs on pushes to main (typically,
|
||||
# a merged pull request) and on pushes of tagged commits.
|
||||
|
||||
# Pushes to main will deploy to Unstable; tagged commits
|
||||
# will deploy to Staging
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
tags:
|
||||
- v*
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy-unstable:
|
||||
# if this job runs on a branch, we deduce that code
|
||||
# has been pushed to main and should be deployed to unstable
|
||||
if: ${{ github.ref_type == 'branch' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Deploy to cloud.gov sandbox
|
||||
uses: 18f/cg-deploy-action@main
|
||||
env:
|
||||
DEPLOY_NOW: thanks
|
||||
with:
|
||||
cf_username: ${{ secrets.CF_USERNAME }}
|
||||
cf_password: ${{ secrets.CF_PASSWORD }}
|
||||
cf_org: sandbox-gsa
|
||||
cf_space: dotgov-poc
|
||||
push_arguments: "-f ops/manifests/manifest-unstable.yaml"
|
||||
|
||||
# deploy-staging:
|
||||
# # if this job runs on a tag, we deduce that code
|
||||
# # has been tagged for release and should be deployed to staging
|
||||
# if: ${{ github.ref_type == 'tag' }}
|
34
.github/workflows/migrate.yaml
vendored
Normal file
34
.github/workflows/migrate.yaml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Run Migrations
|
||||
|
||||
# This workflow can be run from the CLI
|
||||
# gh workflow run migrate.yaml -f environment=sandbox
|
||||
# OR
|
||||
# cf run-task getgov-unstable --wait \
|
||||
# --command 'python manage.py migrate' --name migrate
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
type: choice
|
||||
description: Where should we run migrations
|
||||
options:
|
||||
- unstable
|
||||
- staging
|
||||
|
||||
jobs:
|
||||
migrate-unstable:
|
||||
if: ${{ github.event.inputs.environment == 'unstable' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Run Django migrations for unstable
|
||||
uses: 18f/cg-deploy-action@main
|
||||
with:
|
||||
cf_username: ${{ secrets.CF_USERNAME }}
|
||||
cf_password: ${{ secrets.CF_PASSWORD }}
|
||||
cf_org: sandbox-gsa
|
||||
cf_space: dotgov-poc
|
||||
full_command: "cf run-task getgov-unstable --wait --command 'python manage.py migrate' --name migrate"
|
||||
|
||||
# migrate:
|
||||
# if: ${{ github.event.inputs.environment == 'staging' }}
|
Loading…
Add table
Add a link
Reference in a new issue