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
name: Docs Auto-Sync
on:
schedule:
- cron: '0 0 * * *' # Daily at midnight
workflow_dispatch: # Manual trigger
jobs:
autosync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build Decapod
run: cargo build --release
- name: Generate Docs
run: ./target/release/decapod docs build
- name: Check for drift
id: drift
run: |
if [ -n "$(git status --porcelain docs/)" ]; then
echo "drift=true" >> $GITHUB_OUTPUT
else
echo "drift=false" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.drift.outputs.drift == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: auto-sync documentation from code state"
title: "docs: auto-sync documentation from code state"
body: |
This is an automated PR to sync documentation with the current code state.
Generated by Decapod Docs Auto-Sync workflow.
branch: docs-autosync
base: master