Update _UIViewGlass.md #43
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: Deploy to Production | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: # Allows manual triggering of the workflow | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy-to-cloudflare: | |
| permissions: | |
| contents: read | |
| deployments: write | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Swift | |
| uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: '5.9' # Set the Swift version you need | |
| - name: Build DocC | |
| run: | | |
| sh ./build-site.sh | |
| # - name: Prepare relative files | |
| # run: | | |
| # python3 ./path-replacement.py | |
| - name: Publish to Cloudflare Pages | |
| uses: cloudflare/pages-action@v1 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: 1678d1e70dbdbf026e3ca056f893e76b | |
| projectName: notprivateapis | |
| directory: ./Build/ | |
| # Optional: Enable this if you want to have GitHub Deployments triggered | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
| # Optional: Switch what branch you are publishing to. | |
| # By default this will be the branch which triggered this workflow | |
| branch: main | |
| deploy-to-github-pages: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| runs-on: macos-14 | |
| environment: | |
| # Must set to this for deploying to GitHub Pages | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Swift | |
| uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: '5.9' # Set the Swift version you need | |
| - name: Build DocC | |
| run: | | |
| swift package --allow-writing-to-directory ./ \ | |
| generate-documentation --target NotPrivateAPIs \ | |
| --disable-indexing \ | |
| --transform-for-static-hosting \ | |
| --experimental-enable-custom-templates \ | |
| --hosting-base-path /NotPrivateAPIs \ | |
| --output-path ./Build \ | |
| echo "<script>window.location.href += \"/documentation/notprivateapis\"</script>" > Build/index.html; | |
| # - name: Prepare relative files | |
| # run: | | |
| # python3 ./path-replacement.py | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'Build' | |
| - id: deployment | |
| name: Deploy to GitHub Pages | |
| uses: actions/deploy-pages@v4 | |