-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.18 KB
/
scribe_docc.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
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 Scribe \
--output-path ./gh-pages/docs \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path scribe
- 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