Skip to content

Commit 8822f00

Browse files
committed
Add DocC documentation deployment workflow
1 parent a3ad3f7 commit 8822f00

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: macos-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Select Xcode
19+
run: sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer
20+
21+
- name: Build Documentation
22+
run: |
23+
swift package --allow-writing-to-directory ./docs \
24+
generate-documentation --target Algorand \
25+
--disable-indexing \
26+
--transform-for-static-hosting \
27+
--hosting-base-path swift-algorand \
28+
--output-path ./docs
29+
30+
- name: Upload Pages artifact
31+
uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: ./docs
34+
35+
deploy:
36+
needs: build
37+
runs-on: ubuntu-latest
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)