Repository navigation
53 lines (47 loc) · 2.02 KB
/
Copy pathtrigger-docs.yml
File metadata and controls
53 lines (47 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Trigger Documentation Generation
# Docs are written once the code PR is merged, so the docs PR reflects what shipped.
on:
pull_request:
types:
- closed
# This repo is public; GitHub forbids public callers from using a reusable
# workflow that lives in a private repo (dc-docs). Private repos such as
# haystack-hub-api still call generate-docs.yml via `workflow_call`. Keep the
# steps here in sync with deepset-ai/dc-docs/.github/workflows/generate-docs.yml.
jobs:
trigger-docs:
if: github.event.pull_request.merged == true && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Check out dc-docs
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: deepset-ai/dc-docs
path: dc-docs
token: ${{ secrets.DOCS_TOKEN }}
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Install dependencies
run: pip install anthropic requests
- name: Configure git identity
run: |
git config --global user.name "docs-bot"
git config --global user.email "docs-bot@users.noreply.github.com"
- name: Generate docs and open PR
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.DOCS_TOKEN }}
SOURCE_REPO: ${{ github.repository }}
SOURCE_PR_NUMBER: ${{ github.event.pull_request.number }}
SOURCE_PR_TITLE: ${{ github.event.pull_request.title }}
SOURCE_PR_BODY: ${{ github.event.pull_request.body }}
DOCS_REPO: deepset-ai/dc-docs
DOCS_REVIEWER: agnieszka-m
DOCS_PATH: ./dc-docs
DEEPSET_API_KEY: ${{ secrets.DEEPSET_API_KEY }}
DEEPSET_WORKSPACE: dc-docs-build
DEEPSET_SEARCH_DEPLOYMENT: 4eddcbea-5051-408f-ba03-14a994973fd7
MAX_AGENT_TURNS: "30"
run: python dc-docs/.github/scripts/generate_docs.py