Skip to content

Commit

Permalink
Added workflow for creating documentation pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ppeelen committed Mar 17, 2024
1 parent fbf7251 commit 39e3ca8
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/create-documentation.yml
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

0 comments on commit 39e3ca8

Please sign in to comment.