This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
Backport of Waypoint docs updates into release/0.11.x #110
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: website-mdx | |
on: | |
pull_request: | |
paths: [website/**] | |
jobs: | |
generate-website-mdx: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
path: "." | |
- name: generate plugin docs | |
run: go run ./cmd/waypoint docs -website-mdx | |
- name: generate cli docs | |
run: go run ./tools/gendocs | |
- run: rm waypoint-restore.db.lock; git status | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
path: website/ | |
name: website | |
check-website-mdx: | |
runs-on: ubuntu-latest | |
needs: | |
- generate-website-mdx | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
path: website/ | |
name: website | |
- run: git status | |
- run: cd ./website; npm i -g npm@latest; npm install | |
- run: cd ./website; npx --no-install next-hashicorp format | |
- run: | | |
if ! git diff --exit-code website/content > /dev/null; then | |
echo "Website directory has unstaged mdx changes. This is because you have modified doc strings" | |
echo "that must be reflected in the website. Run the following make command:" | |
echo | |
echo "make gen/website-mdx" | |
echo | |
echo "And then validate that the corresponding website pages look acceptable." | |
git status | |
exit 1 | |
fi | |
permissions: | |
contents: read |