forked from google-agentic-commerce/AP2
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.61 KB
/
docs.yml
File metadata and controls
65 lines (55 loc) · 1.61 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
54
55
56
57
58
59
60
61
62
63
64
65
name: Docs Build and Deploy
on:
push:
branches:
- main
paths:
- ".github/workflows/docs.yml"
- "requirements-docs.txt"
- "mkdocs.yml"
- "docs/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/docs.yml"
- "requirements-docs.txt"
- "mkdocs.yml"
- "docs/**"
jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
if: github.repository == 'google-agentic-commerce/AP2'
steps:
- name: Checkout Code
uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Configure Git Credentials
run: |
git config --global user.name github-actions[bot]
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Restore pip cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-docs.txt') }}
path: ~/.cache/pip
restore-keys: |
${{ runner.os }}-pip-
- name: Install documentation dependencies
run: pip install -r requirements-docs.txt
- name: Build Documentation (PR Check)
if: github.event_name == 'pull_request'
run: mkdocs build
- name: Deploy development version from main branch
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
mkdocs gh-deploy