File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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/swift-docc-action@v1.0.2
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 "action@github.com"
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/github-push-action@v0.6.0
38+ with :
39+ github_token : ${{ secrets.GITHUB_TOKEN }}
40+ branch : docs
41+ force : true
42+ directory : ./docs
You can’t perform that action at this time.
0 commit comments