Small touch ups #18
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
name: DocC GitHub action | |
on: | |
push: | |
branches: | |
- main | |
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 ChromaShell with SwiftPM using DocC | |
run: | | |
swift package --allow-writing-to-directory ./gh-pages/docs \ | |
generate-documentation --target ChromaShell \ | |
--output-path ./gh-pages/docs \ | |
--disable-indexing \ | |
--transform-for-static-hosting \ | |
--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 |