|
48 | 48 | run: php vendor/bin/phan --target-php-version=${{ matrix.php-version }}
|
49 | 49 |
|
50 | 50 |
|
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 |
| - |
79 | 51 | tests:
|
80 | 52 | name: "Unit Tests"
|
81 | 53 | needs: static-code-analysis
|
@@ -120,3 +92,65 @@ jobs:
|
120 | 92 | with:
|
121 | 93 | project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
122 | 94 | 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