ci: Use Xcode 26.1.1 for GitHub Actions workflows #3
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: Documentation | |
| 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: macos-26 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Show Swift version | |
| run: swift --version | |
| - name: Build Documentation | |
| run: | | |
| swift package --allow-writing-to-directory ./docs \ | |
| generate-documentation \ | |
| --target Navigator \ | |
| --output-path ./docs \ | |
| --transform-for-static-hosting \ | |
| --hosting-base-path Navigator | |
| - name: Fix root index.html redirect | |
| run: | | |
| cat > ./docs/index.html << 'EOF' | |
| <!doctype html> | |
| <html lang="en-US"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="refresh" content="0; url=/Navigator/documentation/navigator/"> | |
| <link rel="canonical" href="/Navigator/documentation/navigator/"> | |
| <title>Redirecting to Navigator Documentation</title> | |
| <script> | |
| window.location.href = "/Navigator/documentation/navigator/"; | |
| </script> | |
| </head> | |
| <body> | |
| <p>If you are not redirected automatically, please <a href="/Navigator/documentation/navigator/">click here</a>.</p> | |
| </body> | |
| </html> | |
| EOF | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./docs | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |