forked from stanfordnlp/dspy
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.39 KB
/
Copy pathdocs-push.yml
File metadata and controls
51 lines (47 loc) · 1.39 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
name: Update DSPy Docs
on:
push:
branches:
- main
paths:
- "docs/**"
pull_request:
paths:
- "docs/**"
permissions: {}
jobs:
build-test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install dependencies and build
run: |
cd docs
pip install -r requirements.txt
mkdocs build
update-docs-subtree:
if: github.event_name == 'push' && github.repository == 'stanfordnlp/dspy'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
fetch-depth: 0
- name: Push docs to separate repo
uses: cpina/github-action-push-to-another-repository@55306faa4ed53b815ae49e564af8cfb359d32ae2 # main
env:
API_TOKEN_GITHUB: ${{ secrets.GH_PAT }} # zizmor: ignore[secrets-outside-env]
with:
source-directory: "docs"
destination-github-username: "krypticmouse"
destination-repository-name: "dspy-docs"
user-email: github-actions@github.com
target-branch: master