File tree Expand file tree Collapse file tree 3 files changed +56
-49
lines changed
Expand file tree Collapse file tree 3 files changed +56
-49
lines changed Original file line number Diff line number Diff line change 1+ name : Build FAQ site
2+
3+ on :
4+ push :
5+ branches :
6+ - dev
7+ paths :
8+ - ' docs/**'
9+ - ' assets/**'
10+ - ' mkdocs_remote.yml'
11+ pull_request :
12+ branches :
13+ - dev
14+ paths :
15+ - ' docs/**'
16+ - ' assets/**'
17+ - ' mkdocs_remote.yml'
18+ workflow_dispatch :
19+
20+ permissions :
21+ contents : write
22+
23+ jobs :
24+ build :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout repository
28+ uses : actions/checkout@v4
29+ with :
30+ fetch-depth : 0
31+ - name : Set up Python
32+ uses : actions/setup-python@v5
33+ with :
34+ python-version : ' 3.x'
35+ - name : Install MkDocs
36+ run : pip install mkdocs
37+ - name : Build docs into faq
38+ run : mkdocs build --config-file mkdocs_remote.yml --site-dir faq
39+ - name : Commit built FAQ
40+ id : commit
41+ run : |
42+ if git status --porcelain faq | grep -q .; then
43+ git config user.name "github-actions[bot]"
44+ git config user.email "github-actions[bot]@users.noreply.github.com"
45+ git add faq
46+ git commit -m "chore: build FAQ site [skip ci]"
47+ echo "created=true" >> "$GITHUB_OUTPUT"
48+ else
49+ echo "created=false" >> "$GITHUB_OUTPUT"
50+ fi
51+ - name : Push changes to dev
52+ if : steps.commit.outputs.created == 'true'
53+ env :
54+ TARGET_BRANCH : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || 'dev' }}
55+ run : git push origin "$TARGET_BRANCH"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ function createArchive(fileName, archive) {
6565 archive . directory ( 'tools' ) ;
6666 archive . directory ( 'vendor' ) ;
6767 archive . file ( 'config/.htaccess' ) ;
68- archive . file ( 'faq/index.php ' ) ;
68+ archive . directory ( 'faq' ) ;
6969 archive . file ( 'HEAD' ) ;
7070 archive . file ( 'composer.json' ) ;
7171 archive . file ( 'index.php' ) ;
You can’t perform that action at this time.
0 commit comments