File tree Expand file tree Collapse file tree 3 files changed +63
-15
lines changed Expand file tree Collapse file tree 3 files changed +63
-15
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/sync-docs.yml
2+ name : Sync and Build Documentation
3+
4+ on :
5+ schedule :
6+ - cron : ' 0 6 * * *' # Daily at 6 AM UTC
7+ workflow_dispatch :
8+ repository_dispatch :
9+ types : [docs-updated] # Could be used as a on-push trigger, not sure
10+
11+ jobs :
12+ build-and-deploy :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout GitHub Pages repo
17+ uses : actions/checkout@v4
18+ with :
19+ token : ${{ secrets.GITHUB_TOKEN }}
20+
21+ - name : Setup Python
22+ uses : actions/setup-python@v4
23+ with :
24+ python-version : ' 3.9'
25+
26+ - name : Clone documentation repository
27+ run : |
28+ git clone https://github.com/multi-os-engine/doc.git temp-docs
29+
30+ - name : Install Sphinx and dependencies
31+ run : |
32+ python -m pip install --upgrade pip
33+ pip install sphinx sphinx-rtd-theme
34+
35+ - name : Build documentation
36+ run : |
37+ cd temp-docs
38+ make dirhtml
39+ cd ..
40+
41+ - name : Deploy docs
42+ run : |
43+ rm -rf docs/
44+ mkdir -p docs/
45+ cp -r temp-docs/build/dirhtml/* docs/
46+
47+ rm -rf temp-docs/
48+
49+ - name : Commit and push changes
50+ run : |
51+ git config --local user.email "[email protected] " 52+ git config --local user.name "GitHub Action"
53+ git add docs/
54+ if git diff --staged --quiet; then
55+ echo "No changes to commit"
56+ else
57+ git commit -m "Update documentation $(date '+%Y-%m-%d %H:%M:%S')"
58+ git push
59+ fi
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ include:
9898 - .htaccess
9999 - _pages
100100 - _blogposts
101+ - _downloads
102+ - _images
103+ - _sources
104+ - _static
101105exclude :
102106 - " *.sublime-project"
103107 - " *.sublime-workspace"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments