Revision control

Copy as Markdown

name: Build and publish ComponentLibrary DocC
on:
workflow_dispatch: # Allow manual runs
push:
branches:
- main
paths: # Only runs on changes to BrowserKit files
- BrowserKit/Sources/ComponentLibrary/**
- .github/workflows/firefox-ios-publish-docc.yml
permissions:
contents: read
pages: write
id-token: write # Uses GitHub API to get GitHub Pages configuration outputs
concurrency:
group: github-pages
cancel-in-progress: true # Allow just the most recent deployment
jobs:
docs:
runs-on: xcode-27
strategy:
matrix:
xcode: ["27.1"]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Switch to Xcode ${{ matrix.xcode }}
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Checkout
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- name: Build DocC
run: |
xcodebuild docbuild -project firefox-ios/Client.xcodeproj \
-scheme ComponentLibrary \
-derivedDataPath /tmp/docbuild \
-destination 'generic/platform=iOS';
xcrun docc process-archive transform-for-static-hosting \
/tmp/docbuild/Build/Products/Debug-iphoneos/ComponentLibrary.doccarchive \
--hosting-base-path "firefox-ios" \
--output-path docs;
echo "<script>window.location.href += \"/documentation/componentlibrary\"</script>" > docs/index.html;
- name: Store docs artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
# Upload only docs directory
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4