add deploy preview workflow (#97140)

* add deploy preview workflow

* remove unnecessary file to trigger build

* fix repo

* change ref

* change ref

* update docs

* update codeowners

* Update docs/README.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
This commit is contained in:
Robby Milo 2024-11-29 10:19:06 +01:00 committed by GitHub
parent 3d47dc8e5f
commit 1c60d51905
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 0 deletions

1
.github/CODEOWNERS vendored
View File

@ -714,6 +714,7 @@ embed.go @grafana/grafana-as-code
/.github/workflows/community-release.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/detect-breaking-changes-* @grafana/plugins-platform-frontend
/.github/workflows/doc-validator.yml @grafana/docs-tooling
/.github/workflows/deploy-pr-preview.yml @grafana/docs-tooling
/.github/workflows/epic-add-to-platform-ux-parent-project.yml @meanmina
/.github/workflows/github-release.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/issue-labeled.yml @armandgrillet

22
.github/workflows/deploy-pr-preview.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Deploy pr preview
on:
pull_request:
types:
- opened
- synchronize
- closed
paths:
- "docs/sources/**"
jobs:
deploy-pr-preview:
uses: grafana/writers-toolkit/.github/workflows/deploy-preview.yml@main
with:
sha: ${{ github.event.pull_request.head.sha }}
branch: ${{ github.head_ref }}
event_number: ${{ github.event.number }}
title: ${{ github.event.pull_request.title }}
repo: grafana
website_directory: content/docs/grafana/latest
relative_prefix: /docs/grafana/latest/

View File

@ -19,6 +19,11 @@ First, make sure the Docker daemon is running on your machine. Then, follow thes
If you have the grafana/website repo checked out in the same directory as the grafana repo, then you can run `make docs-local-static` to use local assets (such as images).
## Deploy preview
When you open a PR that changes files in the `docs/sources/` directory, CI builds a deploy preview.
After the deploy preview has been built, the **Deploy pr preview** workflow comments a link to the preview URL and adds a commit status check .
---
## Content guidelines

View File