Skip to content

Implement the FlareUI documentation #36

Implement the FlareUI documentation

Implement the FlareUI documentation #36

Workflow file for this run

name: Deploy DocC
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: macos-12
strategy:
fail-fast: false
matrix:
include:
- target: "Flare"
base_path: "flare"
- target: "FlareUI"
base_path: "flareui"
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build DocC
shell: bash
run: |
mkdir ./docs;
swift build;
swift package \
--allow-writing-to-directory ./docs \
generate-documentation \
--target ${{ matrix.target }} \
--output-path ./docs/${{ matrix.base_path }} \
--transform-for-static-hosting \
--hosting-base-path flare/${{ matrix.base_path }};
- name: Commit and push generated documentation
run: |
git fetch
git worktree add --checkout gh-pages origin/gh-pages
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git switch gh-pages
rm -r ./${{ matrix.base_path }}
cp -r ./docs/${{ matrix.base_path }} ./${{ matrix.base_path }}
rm -r ./docs
git add ./${{ matrix.base_path }}
git commit -a -m "Generated ${{ matrix.target }} Swift DocC"
git push origin gh-pages