Skip to content

Commit

Permalink
Fix: docs workflow (#108)
Browse files Browse the repository at this point in the history
## What

* Fix docs workflow

## Why

(workflow was not working)

## Notes
<!-- Add any notes here -->

## 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)._
  • Loading branch information
korenyoni authored Mar 6, 2023
1 parent fad55c1 commit 171f729
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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..."
Expand Down
3 changes: 1 addition & 2 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ For example:
provider "codefresh" {
api_key = "..."
}

provider "codefresh" {
api_key = "..."
alias = "acme-dev"
Expand All @@ -43,4 +42,4 @@ resource "codefresh_pipeline" "pipeline-dev" {
provider = codefresh.acme-dev
... # Omited for brevity
}
```
```

0 comments on commit 171f729

Please sign in to comment.