Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7ff1edd

Browse files
committedMar 3, 2024·
:octocat: add readthedocs to CI
1 parent 33a7281 commit 7ff1edd

File tree

1 file changed

+62
-28
lines changed

1 file changed

+62
-28
lines changed
 

‎.github/workflows/ci.yml

+62-28
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,6 @@ jobs:
4848
run: php vendor/bin/phan --target-php-version=${{ matrix.php-version }}
4949

5050

51-
build-docs:
52-
name: "Build and publish Docs"
53-
if: github.ref_name == 'main'
54-
runs-on: ubuntu-latest
55-
56-
steps:
57-
- name: "Checkout sources"
58-
uses: actions/checkout@v4
59-
60-
- name: "Install PHP"
61-
uses: shivammathur/setup-php@v2
62-
with:
63-
php-version: "8.1"
64-
coverage: none
65-
tools: phpDocumentor
66-
extensions: curl, fileinfo, intl, json, mbstring, simplexml, sodium, zlib
67-
68-
- name: "Build Docs"
69-
run: phpdoc --config=phpdoc.xml.dist
70-
71-
- name: "Publish Docs to gh-pages"
72-
uses: JamesIves/github-pages-deploy-action@v4
73-
with:
74-
BRANCH: gh-pages
75-
FOLDER: docs
76-
CLEAN: true
77-
78-
7951
tests:
8052
name: "Unit Tests"
8153
needs: static-code-analysis
@@ -120,3 +92,65 @@ jobs:
12092
with:
12193
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
12294
coverage-reports: .build/coverage/clover.xml
95+
96+
97+
build-docs:
98+
name: "Build and publish API docs"
99+
if: github.ref_name == 'main'
100+
runs-on: ubuntu-latest
101+
102+
steps:
103+
- name: "Checkout sources"
104+
uses: actions/checkout@v4
105+
106+
- name: "Install PHP"
107+
uses: shivammathur/setup-php@v2
108+
with:
109+
php-version: "8.1"
110+
coverage: none
111+
tools: phpDocumentor
112+
extensions: curl, fileinfo, intl, json, mbstring, simplexml, sodium, zlib
113+
114+
- name: "Build API docs"
115+
run: phpdoc --config=phpdoc.xml.dist
116+
117+
- name: "Publish API docs to branch gh-pages"
118+
uses: JamesIves/github-pages-deploy-action@v4
119+
with:
120+
branch: gh-pages
121+
folder: .build/phpdocs
122+
clean: true
123+
124+
125+
build-manual:
126+
name: "Build and publish user manual"
127+
if: github.ref_name == 'main'
128+
runs-on: ubuntu-latest
129+
130+
steps:
131+
- name: "Checkout sources"
132+
uses: actions/checkout@v4
133+
134+
- name: "Install PHP"
135+
uses: shivammathur/setup-php@v2
136+
with:
137+
php-version: "8.1"
138+
coverage: none
139+
140+
- name: "Install Sphinx"
141+
run: pip install sphinx myst-parser sphinx-rtd-theme
142+
143+
- name: "Install dependencies with composer"
144+
uses: ramsey/composer-install@v2
145+
146+
- name: "Build manual"
147+
run: |
148+
cd docs
149+
make html
150+
151+
- name: "Publish user manual to branch readthedocs"
152+
uses: JamesIves/github-pages-deploy-action@v4
153+
with:
154+
branch: readthedocs
155+
folder: .build/sphinx/html
156+
clean: true

0 commit comments

Comments
 (0)
This repository has been archived.