Skip to content

Commit

Permalink
Exclude docs from deploys (#4146)
Browse files Browse the repository at this point in the history
* Attempt to exclude docs from doing deployments

* Use paths-ignore

* fix pr checks
  • Loading branch information
asteel-gsa authored Aug 13, 2024
1 parent 82495ef commit 0bd7833
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 85 deletions.
173 changes: 88 additions & 85 deletions .github/workflows/deploy-development.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,88 @@
---
name: Deploy to Development and Management Environment
on:
push:
branches:
- main

jobs:
# ensure that every time a push to main occurs, the container is built and published to ghcr
build-container:
uses: ./.github/workflows/build-docker-container.yml
secrets: inherit
permissions:
contents: read
packages: write
with:
docker-name: fac
image-name: web-container
repo-name: gsa-tts/fac
work-dir: ./backend

testing:
needs: [build-container]
uses: ./.github/workflows/testing-from-ghcr.yml
secrets: inherit

linting:
uses: ./.github/workflows/linting.yml
secrets: inherit

# deploy to Dev & Management spaces
deploy-infrastructure-dev:
name: Deploy infrastructure (development)
needs:
- testing
uses: ./.github/workflows/terraform-apply-env.yml
with:
environment: "dev"
autoapprove: false
secrets: inherit

deploy-infastructure-meta:
name: Deploy infrastructure (meta)
needs:
- testing
uses: ./.github/workflows/terraform-apply-env.yml
with:
environment: "meta"
autoapprove: false
secrets: inherit

new-relic-record:
name: Record deployment to New Relic
needs:
- deploy-infrastructure-dev
uses: ./.github/workflows/new-relic-deployment.yml
with:
environment: "dev"
secrets: inherit

deploy-dev:
name: Deploy application
needs:
- deploy-infrastructure-dev
uses: ./.github/workflows/deploy-application.yml
with:
environment: "dev"
secrets: inherit

scan-dev-post-deploy:
name: ZAP Scan
needs:
- deploy-dev
uses: ./.github/workflows/zap-scan.yml
with:
url: "https://fac-dev.app.cloud.gov/"

generate-e2e-test-data:
needs:
- deploy-dev
name:
uses: ./.github/workflows/end-to-end-test-data-generator.yml
secrets: inherit
with:
environment: "dev"
---
name: Deploy to Development and Management Environment
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'

jobs:
# ensure that every time a push to main occurs, the container is built and published to ghcr
build-container:
uses: ./.github/workflows/build-docker-container.yml
secrets: inherit
permissions:
contents: read
packages: write
with:
docker-name: fac
image-name: web-container
repo-name: gsa-tts/fac
work-dir: ./backend

testing:
needs: [build-container]
uses: ./.github/workflows/testing-from-ghcr.yml
secrets: inherit

linting:
uses: ./.github/workflows/linting.yml
secrets: inherit

# deploy to Dev & Management spaces
deploy-infrastructure-dev:
name: Deploy infrastructure (development)
needs:
- testing
uses: ./.github/workflows/terraform-apply-env.yml
with:
environment: "dev"
autoapprove: false
secrets: inherit

deploy-infastructure-meta:
name: Deploy infrastructure (meta)
needs:
- testing
uses: ./.github/workflows/terraform-apply-env.yml
with:
environment: "meta"
autoapprove: false
secrets: inherit

new-relic-record:
name: Record deployment to New Relic
needs:
- deploy-infrastructure-dev
uses: ./.github/workflows/new-relic-deployment.yml
with:
environment: "dev"
secrets: inherit

deploy-dev:
name: Deploy application
needs:
- deploy-infrastructure-dev
uses: ./.github/workflows/deploy-application.yml
with:
environment: "dev"
secrets: inherit

scan-dev-post-deploy:
name: ZAP Scan
needs:
- deploy-dev
uses: ./.github/workflows/zap-scan.yml
with:
url: "https://fac-dev.app.cloud.gov/"

generate-e2e-test-data:
needs:
- deploy-dev
name:
uses: ./.github/workflows/end-to-end-test-data-generator.yml
secrets: inherit
with:
environment: "dev"
1 change: 1 addition & 0 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '**'
- '!docs/**'
- 'docs/bpmn-workflow-models/**'
- '!.github/ISSUE_TEMPLATE/**'
workflow_dispatch: null

jobs:
Expand Down

0 comments on commit 0bd7833

Please sign in to comment.