File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Deploy
2+
23on :
34 push :
45 branches : [main]
56
7+ # Ensure GITHUB_TOKEN has write permissions to create/update the gh-pages branch
8+ permissions :
9+ contents : write
10+
611jobs :
712 deploy :
813 runs-on : ubuntu-latest
@@ -11,12 +16,35 @@ jobs:
1116 uses : actions/checkout@v3
1217 with :
1318 fetch-depth : 0
14- - uses : actions/setup-python@v2
19+
20+ - name : Setup Python
21+ uses : actions/setup-python@v4
1522 with :
1623 python-version : ' 3.x'
17- - run : python src/generate_html.py
18- - uses : peaceiris/actions-gh-pages@v3
24+
25+ - name : Install dependencies
26+ run : |
27+ if [ -f requirements.txt ]; then
28+ pip install --upgrade pip
29+ pip install -r requirements.txt
30+ fi
31+
32+ - name : Debug file structure
33+ run : |
34+ echo "Workspace contents:" && ls -R .
35+
36+ - name : Generate HTML
37+ run : python src/generate_html.py
38+
39+ - name : List docs directory
40+ run : |
41+ echo "Docs directory after generation:" && ls -R docs
42+
43+ - name : Deploy to gh-pages
44+ uses : peaceiris/actions-gh-pages@v3
1945 with :
2046 github_token : ${{ secrets.GITHUB_TOKEN }}
2147 publish_dir : docs
2248 publish_branch : gh-pages
49+ force_orphan : true
50+ clean : true
You can’t perform that action at this time.
0 commit comments