This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb85f93
commit 5602a36
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy Docs | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Libadwaita | ||
run: | | ||
brew update | ||
brew install libadwaita | ||
sed -i '' 's/-I..includedir.//g' $(brew --prefix)/Library/Homebrew/os/mac/pkgconfig/*/libffi.pc | ||
- name: Build Docs | ||
run: | | ||
xcrun xcodebuild docbuild \ | ||
-scheme Adwaita \ | ||
-destination 'generic/platform=macOS' \ | ||
-derivedDataPath "$PWD/.derivedData" | ||
xcrun docc process-archive transform-for-static-hosting \ | ||
"$PWD/.derivedData/Build/Products/Debug/Adwaita.doccarchive" \ | ||
--output-path "docs" \ | ||
--hosting-base-path "adwaita-swift" | ||
echo "<script>window.location.href += \"/documentation/adwaita\"</script>" > docs/index.html; | ||
- name: Upload Artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'docs' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |