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.
This commit is contained in:
Martin Atkins 2022-01-03 10:03:00 -08:00
parent b802db75d7
commit 218e55b23c
1 changed files with 23 additions and 0 deletions

View File

@ -410,3 +410,26 @@ jobs:
shell: cmd shell: cmd
run: | run: |
e2etest.exe -test.v 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