-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (60 loc) · 1.83 KB
/
publish-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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