Implement the FlareUI
documentation
#38
Workflow file for this run
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: 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 and Push Generated Documentation | |
uses: ./.github/actions/publish_pages | |
with: | |
target: ${{ matrix.target }} | |
base_path: ${{ matrix.base_path }} | |
# - 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 | |
# git worktree remove gh-pages |