Skip to content

Commit

Permalink
Makefile: replace build-docs by generate
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajolet-hashicorp committed Nov 24, 2023
1 parent 8150b8d commit d522d42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ensure-docs-compiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
- shell: bash
run: make build-docs
run: make generate
- shell: bash
run: |
if [[ -z "$(git status -s)" ]]; then
echo "OK"
else
echo "Docs have been updated, but the compiled docs have not been committed."
echo "Run 'make build-docs', and commit the result to resolve this error."
echo "Run 'make generate', and commit the result to resolve this error."
exit 1
fi
8 changes: 1 addition & 7 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ test:
install-packer-sdc: ## Install packer sofware development command
@go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@${HASHICORP_PACKER_PLUGIN_SDK_VERSION}

ci-release-docs: install-packer-sdc
@packer-sdc renderdocs -src docs -partials docs-partials/ -dst docs/
@/bin/sh -c "[ -d docs ] && zip -r docs.zip docs/"

plugin-check: install-packer-sdc build
@packer-sdc plugin-check ${BINARY}

Expand All @@ -31,10 +27,8 @@ testacc: dev

generate: install-packer-sdc
@go generate ./...
# checkout the .docs folder for a preview of the docs

build-docs: install-packer-sdc
@if [ -d ".docs" ]; then rm -r ".docs"; fi
@packer-sdc renderdocs -src "docs" -partials docs-partials/ -dst ".docs/"
@./.web-docs/scripts/compile-to-webdocs.sh "." ".docs" ".web-docs" "ucloud"
@rm -r ".docs"
# checkout the .docs folder for a preview of the docs

0 comments on commit d522d42

Please sign in to comment.