Skip to content

Commit 945a5ba

Browse files
committed
add documentation workflow
1 parent fc5dd3d commit 945a5ba

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build-documentation
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
paths:
7+
- 'Sources/**'
8+
jobs:
9+
build-docc:
10+
runs-on: macos-12
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v1
14+
- uses: actions/cache@v3
15+
with:
16+
path: '.build'
17+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
18+
restore-keys: |
19+
${{ runner.os }}-spm-
20+
- uses: fwcd/[email protected]
21+
with:
22+
target: CodeEditKit
23+
output: ./docs
24+
hosting-base-path: CodeEditKit
25+
disable-indexing: 'true'
26+
transform-for-static-hosting: 'true'
27+
- name: Init new repo in dist folder and commit generated files
28+
run: |
29+
cd docs
30+
git init
31+
git add -A
32+
git config --local user.email "[email protected]"
33+
git config --local user.name "GitHub Action"
34+
git commit -m 'deploy'
35+
36+
- name: Force push to destination branch
37+
uses: ad-m/[email protected]
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
branch: docs
41+
force: true
42+
directory: ./docs

0 commit comments

Comments
 (0)