-
Notifications
You must be signed in to change notification settings - Fork 93
30 lines (24 loc) · 985 Bytes
/
doc.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
name: Documentation
on:
push:
branches: [master]
jobs:
docs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Swift
uses: swift-actions/setup-swift@v1
- name: Generate documentation
run: |
swift package --allow-writing-to-directory docs generate-documentation --target SnowplowTracker --disable-indexing --output-path docs --transform-for-static-hosting --hosting-base-path snowplow-ios-tracker
- name: Redirect from the index page
run: |
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url='https://snowplow.github.io/snowplow-ios-tracker/documentation/snowplowtracker/'" /></head><body></body></html>' > docs/index.html
- name: Deploy to GitHub Pages
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs