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