-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.27 KB
/
docs.yml
File metadata and controls
45 lines (38 loc) · 1.27 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Documentation
on:
push:
branches:
- main
env:
SWIFT_VERSION: 5.6
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Package
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Swift
run: wget -q https://download.swift.org/swift-$SWIFT_VERSION-release/ubuntu2004/swift-$SWIFT_VERSION-RELEASE/swift-$SWIFT_VERSION-RELEASE-ubuntu20.04.tar.gz
- name: Extract Swift
run: tar xzf swift-$SWIFT_VERSION-RELEASE-ubuntu20.04.tar.gz
- name: Add Swift toolchain to PATH
run: |
echo "$GITHUB_WORKSPACE/swift-$SWIFT_VERSION-RELEASE-ubuntu20.04/usr/bin" >> $GITHUB_PATH
- name: Build documentation
run: >
swift package --allow-writing-to-directory docs \
generate-documentation \
--target AsyncHTTP \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path /AsyncHTTP \
--output-path docs
- name: Publish documentation to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
branch: gh-pages
folder: docs
git-config-name: László Teveli
git-config-email: tevelee@gmail.com