-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Actions to build and deploy docc documentations #69
Changes from 13 commits
d2a4445
10ed069
b037792
198bf48
610f695
ac2c29c
21d2920
36db9ae
b202ec3
9fcaa77
53e98c6
eaf1d40
c4fe52e
4fe6940
485635f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy Documentation | ||
on: | ||
push: | ||
branches: [main, dev] | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-13 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: "15.0.0" | ||
- name: Setup Config file | ||
run: | | ||
cp Basic-Car-Maintenance.xcconfig.template Basic-Car-Maintenance.xcconfig | ||
- name: Run Build Docs | ||
run: ./build-docc.sh | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: .docs | ||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
##!/bin/sh | ||
|
||
xcrun xcodebuild docbuild \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might be nice to move this into a subfolder like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about folder named There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
-scheme Basic-Car-Maintenance \ | ||
-destination 'generic/platform=iOS Simulator' \ | ||
-derivedDataPath "$PWD/.derivedData" | ||
|
||
xcrun docc process-archive transform-for-static-hosting \ | ||
"$PWD/.derivedData/Build/Products/Debug-iphonesimulator/Basic-Car-Maintenance.doccarchive" \ | ||
--output-path ".docs" \ | ||
--hosting-base-path "Basic-Car-Maintenance" | ||
|
||
echo '<script>window.location.href += "documentation/basic_car_maintenance"</script>' > .docs/index.html | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be 1 as you do not need the whole history
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do? I haven't looked at it in-depth yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 would get all the git history, brackens and tags. Default is 1 where it will fetch only the intended branch.