Skip to content

Commit 95af2f3

Browse files
committed
added documentation action
1 parent a2c5624 commit 95af2f3

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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: fwcd/swift-docc-action@v1.0.2
15+
with:
16+
target: CodeEditLanguages
17+
output: ./docs
18+
hosting-base-path: CodeEditLanguages
19+
disable-indexing: 'true'
20+
transform-for-static-hosting: 'true'
21+
- name: Init new repo in dist folder and commit generated files
22+
run: |
23+
cd docs
24+
git init
25+
git add -A
26+
git config --local user.email "action@github.com"
27+
git config --local user.name "GitHub Action"
28+
git commit -m 'deploy'
29+
30+
- name: Force push to destination branch
31+
uses: ad-m/github-push-action@v0.6.0
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
branch: docs
35+
force: true
36+
directory: ./docs

0 commit comments

Comments
 (0)