-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.61 KB
/
docs.yaml
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
45
46
47
48
49
50
51
52
53
54
name: Generate and publish docs
on:
push:
branches: [ awatt/doc-gen, main ] # remove my branch before merge!
env:
XCODE_VERSION: 16.1
TUIST_TEST_DEVICE: iPad (10th generation)
TUIST_TEST_PLATFORM: iOS
TUIST_TEST_OS: 17.2
jobs:
build:
name: Generate API docs and publish to GitHub pages
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: ${{ env.XCODE_VERSION }}
# Get Swift 6.1 for docc merge
- name: Install Swiftly and Swift 6.1
run: |
curl -O "https://download.swift.org/swiftly/darwin/swiftly.pkg"
installer -pkg swiftly.pkg -target CurrentUserHomeDirectory
# the swiftly binary is extracted to ~/local/bin/swiftly on macOS
~/.swiftly/bin/swiftly init --verbose --assume-yes --skip-install
. ~/.swiftly/env.sh
hash -r
swiftly install 6.1.0 --use
hash -r
which docc
- name: Install dependencies
run: tuist install --path Samples
- name: Generate project
run: tuist generate --path Samples --no-open
- name: Generate Docs
run: Scripts/generate_docs.sh
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@df5cc2bfa78282ded844b354faee141f06b41865
with:
target_branch: gh-pages
build_dir: generated_docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}