Repository navigation
Merge pull request #1526 from discord-php/codex/game-stats-profiles #5296
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Docs | |
| on: | |
| push: | |
| branches: [master] | |
| release: | |
| types: [published] | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: docs-deploy | |
| queue: max | |
| if: github.event_name == 'release' || contains(github.event.head_commit.message, 'build docs') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.1' | |
| extensions: iconv | |
| tools: composer | |
| - name: Install phpDocumentor | |
| run: >- | |
| composer create-project discord-php/phpdoc-tool:^1.0 phpdoc-tool | |
| --no-interaction --no-progress | |
| --repository='{"type":"vcs","url":"https://github.com/discord-php/phpdoc-tool"}' | |
| - name: Build class reference | |
| run: php phpdoc-tool/vendor/bin/phpdoc | |
| - name: Build documentation | |
| run: | | |
| cd ./docs | |
| yarn install | |
| yarn build | |
| sudo mv public/* ../build | |
| - name: Publish docs | |
| uses: JamesIves/github-pages-deploy-action@v4.9.0 | |
| with: | |
| token: ${{ github.token }} | |
| branch: gh-pages | |
| folder: build | |
| clean: true |