Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Docs sync #362

Merged
merged 9 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 31 additions & 33 deletions .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
name: Refresh Docs
name: Docs
on:
schedule:
- cron: '0 0 * * *'

jobs:
operator-docs:
sync-docs:
runs-on: ubuntu-latest
permissions:
contents: 'write'
id-token: 'write'
pull-requests: 'write'
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Regenerate Docs'
run: make crd-docs
- id: date
run: echo "date=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT
- name: Create Pull Request
- name: Checkout
uses: actions/checkout@v4
- name: Sync docs
run: make sync-docs
- name: Save date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
title: Generating Api Docs for ${{steps.date.outputs.date}}
body: Automated pull request to regenerate api docs for the Plural operator
commit-message: Update docs for operator
title: "chore: API documentation sync"
body: |
Automated pull request to sync docs for:
- Console operator
- Deployment operator
- Liquid filters
commit-message: sync docs
branch: docs-${{steps.date.outputs.date}}
labels: release
labels: documentation
base: main
liquid-docs:
runs-on: ubuntu-latest
permissions:
contents: 'write'
id-token: 'write'
pull-requests: 'write'
steps:
- uses: actions/checkout@v3
- run: make liquid-docs
- id: date
run: echo "date=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT
- uses: peter-evans/create-pull-request@v5
with:
title: "docs: Update supported Liquid filters docs"
body: Automated pull request to regenerate supported Liquid filters docs.
commit-message: update supported Liquid filters docs
branch: docs-${{steps.date.outputs.date}}
labels: enhancement
base: main
# - name: Auto-approve
# if: steps.cpr.outputs.pull-request-operation == 'created'
# run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}"
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable pull request auto-merge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ yarn-install: .PHONY
web: ## runs the docs site locally
yarn dev

crd-docs:
sync-docs: sync-console-crd-docs sync-operator-crd-docs sync-liquid-docs

sync-console-crd-docs:
curl -L https://raw.githubusercontent.com/pluralsh/console/master/go/controller/docs/api.md --output pages/deployments/operator/api.md

liquid-docs:
sync-operator-crd-docs:
curl -L https://raw.githubusercontent.com/pluralsh/deployment-operator/main/docs/api.md --output pages/deployments/operator/agent-api.md

sync-liquid-docs:
curl -L https://raw.githubusercontent.com/pluralsh/polly/main/docs/liquid-filters.md --output pages/deployments/templating-filters.md
Loading
Loading