mirror of https://github.com/grafana/grafana
Update `make docs` procedure and related workflows (#71537)
* Add myself as CODEOWNER for `make docs` procedure and related workflows Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Update `make docs` procedure Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Add workflow to update `make docs` procedure Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Update doc-validator workflow Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix team handle Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Clean up CODEOWNERS Signed-off-by: Jack Baldry <jack.baldry@grafana.com> --------- Signed-off-by: Jack Baldry <jack.baldry@grafana.com>pull/71600/head
parent
c4fff1c5f2
commit
e8b4228f89
@ -0,0 +1,27 @@ |
||||
name: Update `make docs` procedure |
||||
on: |
||||
schedule: |
||||
- cron: '0 7 * * 1-5' |
||||
jobs: |
||||
main: |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- name: Checkout repository |
||||
uses: actions/checkout@v3 |
||||
|
||||
- name: Update procedure |
||||
if: github.repository != 'grafana/writers-toolkit' |
||||
run: | |
||||
curl -s -Lo docs/docs.mk https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk |
||||
curl -s -Lo docs/make-docs https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs |
||||
if git diff --exit-code; then exit 0; fi |
||||
BRANCH="$(date +%Y-%m-%d)/update-make-docs" |
||||
git checkout -b "${BRANCH}" |
||||
git add . |
||||
git config --local user.email "bot@grafana.com" |
||||
git config --local user.name "grafanabot" |
||||
git commit -m "Update \`make docs\` procedure" |
||||
git push -v origin "refs/heads/${BRANCH}" |
||||
gh pr create --fill |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
@ -1,11 +1,11 @@ |
||||
# List of projects to provide to the make-docs script.
|
||||
PROJECTS = grafana
|
||||
PROJECTS := grafana
|
||||
|
||||
# Use the doc-validator image defined in CI by default.
|
||||
export DOC_VALIDATOR_IMAGE := $(shell sed -En 's, *image: "(grafana/doc-validator[^"]+)",\1,p' "$(shell git rev-parse --show-toplevel)/.github/workflows/doc-validator.yml")
|
||||
|
||||
# Skip some doc-validator checks.
|
||||
export DOC_VALIDATOR_SKIP_CHECKS := ^(?:image.+|canonical-does-not-match-pretty-URL)$
|
||||
export DOC_VALIDATOR_SKIP_CHECKS := $(shell sed -En "s, *'--skip-checks=(.+)',\1,p" "$(shell git rev-parse --show-toplevel)/.github/workflows/doc-validator.yml")
|
||||
|
||||
# Use alternative image until make-docs 3.0.0 is rolled out.
|
||||
export DOCS_IMAGE := grafana/docs-base:dbd975af06
|
||||
# Only run on sections that have been enabled in CI.
|
||||
export DOC_VALIDATOR_INCLUDE := $(shell sed -En "s, *'--include=\\^docs/sources/(.+)',/hugo/content/docs/grafana/latest/\1,p" "$(shell git rev-parse --show-toplevel)/.github/workflows/doc-validator.yml")
|
||||
|
Loading…
Reference in new issue