Update docc.yml #103
Workflow file for this run
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: docc | |
on: | |
push: | |
branches: [ "**" ] # TEMP | |
# branches: [ "main" ] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: pages | |
cancel-in-progress: true | |
jobs: | |
pages: | |
environment: | |
name: github-pages | |
url: '${{ steps.deployment.outputs.page_url }}' | |
runs-on: macos-latest | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 16.0 | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Swift | |
uses: swift-actions/setup-swift@v1 | |
- name: Build and Export DocC | |
run: | | |
swift package --allow-writing-to-directory docs \ | |
generate-documentation --target AppState \ | |
--output-path docs \ | |
--transform-for-static-hosting \ | |
--hosting-base-path AppState | |
echo '<script>window.location.href += "/documentation/appstate"</script>' > docs/index.html | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-output | |
path: docs | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |