Skip to content

Workflow file for this run

name: DocC GitHub action
on:
push:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Swift environment
uses: swift-actions/setup-swift@v2
- name: Setup Git worktree
run: |
git fetch
git worktree add --checkout gh-pages origin/gh-pages
- name: Build docs with SwiftPM using DocC
run: |
swift package --allow-writing-to-directory ./gh-pages/docs \
generate-documentation --target Chroma \
--output-path ./gh-pages/docs \
--disable-indexing \
--transform-for-static-hosting \
--include-extended-types \
--hosting-base-path chroma-shell
- name: Commit and push generated documentation
run: |
cd gh-pages
git add docs
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Updating Docs for github-pages"
git push origin HEAD:gh-pages
cd ..
git worktree remove gh-pages