From 218e55b23cf19cb55183617ee68b86d6cc363c14 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 3 Jan 2022 10:03:00 -0800 Subject: [PATCH] build: Build docs source package as part of the release pipeline This should eventually grow to be a step that actually verifies the validity of the docs source prior to publishing the artifact that a downstream publishing pipeline can consume, but for the moment it's really just a placeholder since we have no such validation step and no downstream pipeline consuming this artifact. The general idea here is that the artifacts from this workflow should be sufficient for all downstream release steps to occur without any direct access to the Terraform CLI repository, and so this is intended to eventually meet that ideal but as of this commit the website docs publishing step _does_ still depend on direct access to this repository. --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee7dc5369..dd28e27da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -410,3 +410,26 @@ jobs: shell: cmd run: | e2etest.exe -test.v + + docs-source-package: + name: "Build documentation bundle" + runs-on: ubuntu-latest + needs: + - get-product-version + + env: + version: ${{needs.get-product-version.outputs.product-version}} + + steps: + - uses: actions/checkout@v2 + # FIXME: We should include some sort of pre-validation step here, to + # confirm that the doc content is mechanically valid so that the + # publishing pipeline will be able to render all content without errors. + - name: "Create documentation source bundle" + run: | + (cd website && zip -9 -r ../terraform-cli-docs-source_${{ env.version }}.zip .) + - uses: actions/upload-artifact@v2 + with: + name: terraform-cli-docs-source_${{ env.version }}.zip + path: terraform-cli-docs-source_${{ env.version }}.zip + if-no-files-found: error