Merge pull request #528 from authzed/update-docs-generation #41
This file contains hidden or 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: "Sync Generated Docs" | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- "main" | |
env: | |
DOCS_REPO: "authzed/docs" | |
TARGET_DOCS_FILE: "pages/spicedb/getting-started/installing-zed.mdx" | |
CHANGES_DETECTED: false | |
permissions: | |
contents: "write" | |
pull-requests: "write" | |
actions: "write" | |
repository-projects: "write" | |
jobs: | |
sync-docs: | |
name: "Generate & Sync Documentation" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "authzed/actions/setup-go@main" | |
- uses: "authzed/actions/setup-mage@main" | |
- name: "Generate Documentation" | |
run: "mage gen:docsForPublish" | |
- name: "Checkout docs repository" | |
uses: "actions/checkout@v4" | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
repository: "${{ env.DOCS_REPO }}" | |
path: "docs-repo" | |
ref: "main" | |
- name: "Sync documentation changes" | |
run: | | |
cp -v docs/merged.md docs-repo/$TARGET_DOCS_FILE | |
- name: "Create commit & pull request" | |
uses: "peter-evans/create-pull-request@v7" | |
with: | |
token: "${{ secrets.PAT_TO_PUSH_TO_DOCS }}" | |
path: "docs-repo" | |
title: "Auto-generated PR: Update zed docs" | |
body: "This PR was auto-generated by GitHub Actions." | |
branch: "auto-update-branch" |