From 171f729020cc563e0e0212372a8484c6140e7b3a Mon Sep 17 00:00:00 2001 From: Yonatan Koren Date: Mon, 6 Mar 2023 15:28:00 +0200 Subject: [PATCH] Fix: docs workflow (#108) ## What * Fix docs workflow ## Why (workflow was not working) ## Notes ## PR Checklist * [x] _I have read [CONTRIBUTING.md](https://github.com/codefresh-io/terraform-provider-codefresh/blob/master/README.md)._ * [x] _I have [allowed changes to my fork to be made](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)._ * [x] _I have added tests, assuming new tests are warranted_. * [x] _I have updated the Terraform docs in this repo, assuming any changes to the schema of Resources or Data Sources have been made._ * [x] _I understand that the `/test` comment will be ignored by the CI trigger [unless it is made by a repo admin or collaborator](https://codefresh.io/docs/docs/pipelines/triggers/git-triggers/#support-for-building-pull-requests-from-forks)._ --- .github/workflows/docs.yaml | 3 ++- GNUmakefile | 5 ++--- templates/index.md.tmpl | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index ce6cbee..f7a3797 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -18,7 +18,8 @@ jobs: with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} - - run: | + - name: Generate Docs + run: | export PATH=$PATH:/home/runner/go/bin make docs-prepare tfplugindocs generate diff --git a/GNUmakefile b/GNUmakefile index af3413e..fdd0cdf 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -5,7 +5,6 @@ HOSTNAME=codefresh.io PKG_NAME=codefresh NAMESPACE=app BINARY=terraform-provider-${PKG_NAME} -VERSION=0.2.1 OS_ARCH=darwin_amd64 TFPLUGINDOCS_VERSION=v0.14.1 @@ -60,8 +59,8 @@ vet: fi docs-prepare: - @echo "==> Setting up docs..." - which tfplugindocs || go get github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@${TFPLUGINDOCS_VERSION} + @echo "==> Setting up tfplugindocs..." + go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@${TFPLUGINDOCS_VERSION} docs: docs-prepare @echo "==> Generating Provider Documentation..." diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl index 7cefcb5..aca0707 100644 --- a/templates/index.md.tmpl +++ b/templates/index.md.tmpl @@ -29,7 +29,6 @@ For example: provider "codefresh" { api_key = "..." } - provider "codefresh" { api_key = "..." alias = "acme-dev" @@ -43,4 +42,4 @@ resource "codefresh_pipeline" "pipeline-dev" { provider = codefresh.acme-dev ... # Omited for brevity } -``` \ No newline at end of file +```