Update GitHub workflows #104
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
| # This workflow builds and publishes DocC docs to GitHub Pages. | |
| # Source: https://maxxfrazer.medium.com/deploying-docc-with-github-actions-218c5ca6cad5 | |
| # Sample: https://github.com/AgoraIO-Community/VideoUIKit-iOS/blob/main/.github/workflows/deploy_docs.yml | |
| name: DocC Runner | |
| on: | |
| push: | |
| branches: ["main"] | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: macos-latest # macos-15 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v5 | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable # 16.4 | |
| - name: Build DocC | |
| run: bash scripts/docc.sh | |
| - name: Upload DocC Artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '.build/docs-iOS' | |
| - name: Deploy to GitHub Pages | |
| uses: actions/deploy-pages@v4 |