forked from rarestype/swift-json
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (82 loc) · 3.14 KB
/
Documentation.yml
File metadata and controls
96 lines (82 loc) · 3.14 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
96
# ❣❣❣ DO NOT EDIT ❣ THIS FILE IS AUTOMATICALLY SYNCED ❣ DO NOT EDIT ❣❣❣
# This workflow validates the package’s documentation. Because documentation building involves
# compiling the package, this also checks that the package itself compiles successfully on each
# supported platform.
name: Documentation
permissions:
contents: write
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
changes:
runs-on: ubuntu-latest
name: Assess changes
steps:
- name: 🤍 Checkout repository 🤍
uses: actions/checkout@v6
with:
# need to fetch the preceding commit
fetch-depth: 2
- name: 🤍 Decide checks 🤍
uses: tj-actions/changed-files@v47
id: changes
with:
files_ignore: |
README.md
LICENSE
NOTICE
.mailmap
.gitignore
.github/FUNDING.yml
.github/workflows/Deploy.yml
.github/workflows/Security.yml
.github/workflows/SemanticRelease.yml
.github/workflows/SemanticTitle.yml
outputs:
code_changed: ${{ steps.changes.outputs.any_changed }}
Linux:
runs-on: ubuntu-24.04
name: Ubuntu 24.04
needs: changes
if: needs.changes.outputs.code_changed == 'true'
steps:
- name: 🤍 Install Swift 🤍
uses: rarestype/swift-install-action@v1
with:
swift-release: 6.3-RELEASE
- name: 🤍 Install Unidoc 🤍
uses: rarestype/unidoc-action@v1
# This clobbers everything in the current directory!
- name: 🤍 Checkout repository 🤍
uses: actions/checkout@v6
- name: 🤍 Validate documentation 🤍
run: |
unidoc build \
--ci fail-on-errors \
--project-path . \
--swift-toolchain $SWIFT_INSTALLATION
- name: 🤍 Update badge 🤍
uses: rarestype/rarestbadge@v1
if: always()
macOS:
runs-on: macos-26
needs: changes
if: needs.changes.outputs.code_changed == 'true'
steps:
- name: 🤍 Install Unidoc 🤍
uses: rarestype/unidoc-action@v1
- name: 🤍 Checkout repository 🤍
uses: actions/checkout@v6
- name: 🤍 Select Xcode 26.4 🤍
run: sudo xcode-select -s /Applications/Xcode_26.4.app/Contents/Developer
- name: 🤍 Validate documentation 🤍
run: |
unidoc build \
--ci fail-on-errors \
--project-path .
- name: 🤍 Update badge 🤍
uses: rarestype/rarestbadge@v1
if: always()