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

ci: reintroduce readme_sync workflow #6490

Merged
merged 4 commits into from
Dec 6, 2023
Merged
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
44 changes: 44 additions & 0 deletions .github/workflows/readme_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Sync docs with Readme

on:
pull_request:
paths:
- "docs/pydoc/**"
push:
branches:
- main

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/pydoc/requirements.txt

- name: Generate API docs
env:
# This is necessary to fetch the documentation categories
# from Readme.io as we need them to associate the slug
# in config files with their id.
README_API_KEY: ${{ secrets.README_API_KEY }}
run: ./.github/utils/pydoc-markdown.sh

- name: Sync preview docs with 2.0
# Sync the preview docs to the `2.0` version on Readme
id: sync-main
if: github.ref_name == 'main' && github.event_name == 'push'
uses: readmeio/[email protected]
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
with:
rdme: docs ./docs/pydoc/temp --key="$README_API_KEY" --version=2.0