From 83d6d5e732b66b3547f351d979592500561a761d Mon Sep 17 00:00:00 2001 From: Max Wardle Date: Mon, 11 Dec 2023 14:56:30 -0800 Subject: [PATCH 1/2] added dev pipeline --- .github/workflows/publish-dev.yaml | 29 +++++++++++++++++++++++++++++ .github/workflows/publish-prod.yaml | 29 +++++++++++++++++++++++++++++ mkdocs.yml | 11 ++++++++--- 3 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish-dev.yaml create mode 100644 .github/workflows/publish-prod.yaml diff --git a/.github/workflows/publish-dev.yaml b/.github/workflows/publish-dev.yaml new file mode 100644 index 0000000..8c59587 --- /dev/null +++ b/.github/workflows/publish-dev.yaml @@ -0,0 +1,29 @@ +name: Build TechDocs with DevHub TechDocs Publish Action + +on: + workflow_dispatch: + push: + branches: [ dev ] + paths: + - "mkdocs.yml" + - "docs/*" + +jobs: + test_techdocs_build_job: + runs-on: ubuntu-latest + + name: A job to build and publish techdocs content + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build TechDocs + uses: bcgov/devhub-techdocs-publish@stable + id: build_and_publish + with: + publish: 'true' + production: ${{ github.ref == 'refs/heads/dev' && 'true' || 'false' }} # example of only pushing to dev DevHub when changes that triggered the job are in `dev` branch + bucket_name: ${{ secrets.TECHDOCS_S3_BUCKET_NAME }} + s3_access_key_id: ${{ secrets.TECHDOCS_AWS_ACCESS_KEY_ID }} + s3_secret_access_key: ${{ secrets.TECHDOCS_AWS_SECRET_ACCESS_KEY }} + s3_region: ${{ secrets.TECHDOCS_AWS_REGION }} + s3_endpoint: ${{ secrets.TECHDOCS_AWS_ENDPOINT }} diff --git a/.github/workflows/publish-prod.yaml b/.github/workflows/publish-prod.yaml new file mode 100644 index 0000000..0c79e7b --- /dev/null +++ b/.github/workflows/publish-prod.yaml @@ -0,0 +1,29 @@ +# name: Build TechDocs with DevHub TechDocs Publish Action + +# on: +# workflow_dispatch: +# push: +# branches: [ main ] +# paths: +# - "mkdocs.yml" +# - "docs/*" + +# jobs: +# test_techdocs_build_job: +# runs-on: ubuntu-latest + +# name: A job to build and publish techdocs content +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Build TechDocs +# uses: bcgov/devhub-techdocs-publish@stable +# id: build_and_publish +# with: +# publish: 'true' +# production: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }} # example of only pushing to prod DevHub when changes that triggered the job are in `main` branch +# bucket_name: ${{ secrets.TECHDOCS_S3_BUCKET_NAME }} +# s3_access_key_id: ${{ secrets.TECHDOCS_AWS_ACCESS_KEY_ID }} +# s3_secret_access_key: ${{ secrets.TECHDOCS_AWS_SECRET_ACCESS_KEY }} +# s3_region: ${{ secrets.TECHDOCS_AWS_REGION }} +# s3_endpoint: ${{ secrets.TECHDOCS_AWS_ENDPOINT }} diff --git a/mkdocs.yml b/mkdocs.yml index cf57a27..b6c1ff3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,12 @@ site_name: BC Government Public Cloud Technical Documentation docs_dir: docs -# nav: -# - General: -# - Some Menu Item: docs/design-system/about-the-design-system.md +nav: +- Get Started: + - B.C. Government AWS Landing Zone overview: bc-govs-aws-landing-zone-overview.md + - Provision a project set in AWS: provision-a-project-set.md + - Account access: provision-a-project-set.md#account-access +- Design, Build and Deploy an Application: + - Deploy an app to BC Gov's AWS Landing Zone: deploy-an-app-to-the-aws-landing-zone + - AWS IAM User service: iam-user-service.md plugins: - techdocs-core From 8284304920648cd29118970d2b7ddb4473903ff4 Mon Sep 17 00:00:00 2001 From: Max Wardle Date: Mon, 11 Dec 2023 15:03:33 -0800 Subject: [PATCH 2/2] updated production vars --- .github/workflows/publish-dev.yaml | 2 +- .github/workflows/publish-prod.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-dev.yaml b/.github/workflows/publish-dev.yaml index 8c59587..16683ad 100644 --- a/.github/workflows/publish-dev.yaml +++ b/.github/workflows/publish-dev.yaml @@ -21,7 +21,7 @@ jobs: id: build_and_publish with: publish: 'true' - production: ${{ github.ref == 'refs/heads/dev' && 'true' || 'false' }} # example of only pushing to dev DevHub when changes that triggered the job are in `dev` branch + production: 'false' bucket_name: ${{ secrets.TECHDOCS_S3_BUCKET_NAME }} s3_access_key_id: ${{ secrets.TECHDOCS_AWS_ACCESS_KEY_ID }} s3_secret_access_key: ${{ secrets.TECHDOCS_AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/publish-prod.yaml b/.github/workflows/publish-prod.yaml index 0c79e7b..745fd2e 100644 --- a/.github/workflows/publish-prod.yaml +++ b/.github/workflows/publish-prod.yaml @@ -21,7 +21,8 @@ # id: build_and_publish # with: # publish: 'true' -# production: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }} # example of only pushing to prod DevHub when changes that triggered the job are in `main` branch +# production: 'true' +# # production: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }} # example of only pushing to prod DevHub when changes that triggered the job are in `main` branch # bucket_name: ${{ secrets.TECHDOCS_S3_BUCKET_NAME }} # s3_access_key_id: ${{ secrets.TECHDOCS_AWS_ACCESS_KEY_ID }} # s3_secret_access_key: ${{ secrets.TECHDOCS_AWS_SECRET_ACCESS_KEY }}