Skip to content

Commit

Permalink
Add documentation CI job
Browse files Browse the repository at this point in the history
To ensure that 'make docs' functionality does not break.
  • Loading branch information
stuart-mclaren-hpe committed Sep 4, 2024
1 parent d633174 commit 2d95682
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP
name: Build

on:
push:
branches:
- main
pull_request:
jobs:
docs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.22.3'
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.9.5
- run: go install github.com/hashicorp/terraform-plugin-docs/cmd/[email protected]
- run: make docs
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ install-experimental:
go install -tags experimental ./...

docs:
echo -e ${PROVIDER_TF} > __docs.tf; \
printf "${PROVIDER_TF}" > __docs.tf; \
tempfile=$$(mktemp); \
terraform providers schema -json | \
sed '[email protected]/hewlettpackard/hpegl-pcbe-terraform-resources@hpegl@g' > $$tempfile; \
Expand Down

0 comments on commit 2d95682

Please sign in to comment.