-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added workflow for creating documentation pages
- Loading branch information
Showing
1 changed file
with
47 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,47 @@ | ||
name: Update documentation | ||
|
||
on: | ||
push: | ||
branches: [ "DocumentationPages" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Generate the DocC Documentation for this project | ||
runs-on: macos-14 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: gh-pages | ||
|
||
- name: Update local branch | ||
run: | | ||
git fetch origin main | ||
git reset --hard origin/main | ||
- name: Build documentation | ||
env: | ||
scheme: ${{ 'default' }} | ||
run: | | ||
xcodebuild docbuild -scheme TibberSwift -destination 'generic/platform=ios' -derivedDataPath '.documentationArchive/' | ||
- name: Create web folder | ||
run: | | ||
$(xcrun --find docc) process-archive \ | ||
transform-for-static-hosting .documentationArchive/Build/Products/Debug-iphoneos/DoccFramework.doccarchive \ | ||
--output-path docs \ | ||
--hosting-base-path TibberSwift | ||
- name: Commit changes | ||
run: | | ||
git add docs | ||
git commit -m "Updated the documentation" | ||
- name: Push changes | ||
run: | | ||
git push --force |