Skip to content

Added workflow for creating documentation pages #2

Added workflow for creating documentation pages

Added workflow for creating documentation pages #2

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