File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Check Docs
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+
8+ check_changes :
9+ runs-on : ubuntu-latest
10+ outputs :
11+ docs_changes : ${{ steps.check_file_changed.outputs.changed }}
12+ steps :
13+ - uses : actions/checkout@v3
14+ with :
15+ # Checkout as many commits as needed for the diff
16+ fetch-depth : 2
17+
18+ # Generate docs
19+ # Return true/false if docs are changed
20+ - id : check_file_changed
21+ run : |
22+ ./gendocs.sh
23+ if git diff --name-only | grep -E "^docs|devspace-schema.json"; then
24+ echo "{changed}={True}" >> $GITHUB_OUTPUT
25+ else
26+ echo "{changed}={False}" >> $GITHUB_OUTPUT
27+ fi
28+
29+
30+
31+ check-docs :
32+ runs-on : ubuntu-latest
33+ needs : check_changes
34+ if : needs.check_changes.outputs.docs_changes == 'True'
35+ permissions :
36+ pull-requests : write
37+ steps :
38+ - uses : mshick/add-pr-comment@v2
39+ with :
40+ allow-repeats : true
41+ message : |
42+ **Docs Update Needed!**
43+ It seems like you need to run `gendocs.sh` in order to update the docs.
44+ Please run this command and commit before merging.
45+ Thanks!
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -o errexit
4+ set -o nounset
5+
6+ go run ./docs/hack/cli/main.go
7+ go run ./docs/hack/config/partials/main.go
8+ go run ./docs/hack/config/schemas/main.go
You can’t perform that action at this time.
0 commit comments