chore: Add predefined commands for PHPUnit run configurations (#676) #128
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: Generating API documentation | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| jobs: | |
| docs: | |
| name: Generating API documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: 20 | |
| - name: Create documentation directory | |
| run: mkdir -p docs/api | |
| - name: Cache phpDocumentor build files | |
| id: phpdocumentor-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: .phpdoc/cache | |
| key: ${{ runner.os }}-phpdocumentor-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-phpdocumentor- | |
| - name: Build with phpDocumentor | |
| run: docker run --rm --volume "$(pwd):/data" phpdoc/phpdoc:3.4 -vv --template default | |
| - name: Upload documentation | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| run: npx vercel deploy docs/api -t ${{ secrets.VERCEL_TOKEN }} --prod --yes |