-
Notifications
You must be signed in to change notification settings - Fork 70
95 lines (91 loc) · 2.76 KB
/
Copy pathdocumentation.yml
File metadata and controls
95 lines (91 loc) · 2.76 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Documentation
on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build DocC site
runs-on:
- self-hosted
- macos-15
env:
OPENSWIFTUI_WERROR: 0
OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH: 1
OPENSWIFTUI_COMPATIBILITY_TEST: 0
OPENSWIFTUI_SWIFT_LOG: 0
OPENSWIFTUI_SWIFT_CRYPTO: 0
OPENSWIFTUI_TARGET_RELEASE: 2024
OPENSWIFTUI_USE_LOCAL_DEPS: 1
OPENSWIFTUI_LINK_TESTING: 0
OPENSWIFTUI_SPI_GENERATE_DOCS: 1
SPI_GENERATE_DOCS: 1
DOCC_RENDERER_REPOSITORY: OpenSwiftUIProject/swift-docc-render-artifact
DOCC_RENDERER_REF: release/6.3-colorful
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: Setup Xcode
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: "26.3"
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Check out DocC renderer
run: |
renderer_path="${RUNNER_TEMP}/swift-docc-render-artifact"
rm -rf "$renderer_path"
git clone \
--depth 1 \
--filter=blob:none \
--single-branch \
--branch "$DOCC_RENDERER_REF" \
"https://github.com/${DOCC_RENDERER_REPOSITORY}.git" \
"$renderer_path"
test -d "$renderer_path/dist"
echo "DOCC_HTML_DIR=$renderer_path/dist" >> "$GITHUB_ENV"
shell: bash
- name: Build DocC for GitHub Pages
run: |
Scripts/build-documentation.sh \
--clean \
--hosting-base-path /OpenSwiftUI \
--source-service github \
--source-service-base-url "https://github.com/OpenSwiftUIProject/OpenSwiftUI/blob/${GITHUB_REF_NAME}"
shell: bash
- name: Prepare Pages artifact
run: touch .docs/build/docc-output/.nojekyll
shell: bash
- name: Install GNU tar
run: |
if ! command -v gtar >/dev/null 2>&1; then
brew install gnu-tar
fi
shell: bash
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: .docs/build/docc-output
deploy:
name: Deploy DocC site
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4