Skip to content

docs: generate api docs #2

docs: generate api docs

docs: generate api docs #2

Workflow file for this run

name: Generate and publish docs
on:
push:
branches: [ awatt/doc-gen, main ] # remove my branch before merge!
env:
XCODE_VERSION: 16.1
TUIST_TEST_DEVICE: iPad (10th generation)
TUIST_TEST_PLATFORM: iOS
TUIST_TEST_OS: 17.2
jobs:
build:
name: Generate API docs and publish to GitHub pages
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: ${{ env.XCODE_VERSION }}
# Get Swift 6.1 for docc merge
- name: Install Swiftly and Swift 6.1
run: |
curl -O "https://download.swift.org/swiftly/darwin/swiftly.pkg"
installer -pkg swiftly.pkg -target CurrentUserHomeDirectory
# the swiftly binary is extracted to ~/local/bin/swiftly on macOS
~/.swiftly/bin/swiftly init --verbose --assume-yes --skip-install
. ~/.swiftly/env.sh
hash -r
swiftly use 6.1.0
- name: Install dependencies
run: tuist install --path Samples
- name: Generate project
run: tuist generate --path Samples --no-open
- name: Generate Docs
run: Scripts/generate_docs.sh
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@df5cc2bfa78282ded844b354faee141f06b41865
with:
target_branch: gh-pages
build_dir: generated_docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}