ci: port rich changelog and publish-release workflow from workos-kotlin #12
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: Publish API Docs | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 | |
| with: | |
| php-version: '8.2' | |
| tools: composer | |
| - run: composer install --no-interaction --no-progress | |
| - run: ./script/docs | |
| - uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 | |
| - name: Archive site | |
| run: | | |
| tar \ | |
| --dereference --hard-dereference \ | |
| --directory docs/_site \ | |
| -cvf "$RUNNER_TEMP/artifact.tar" \ | |
| --exclude=.git \ | |
| --exclude=.github \ | |
| . | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: github-pages | |
| path: ${{ runner.temp }}/artifact.tar | |
| retention-days: 1 | |
| if-no-files-found: error | |
| deploy: | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 | |
| id: deployment |