-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (45 loc) · 1.28 KB
/
documentation.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Documentation
on:
push:
branches: ["main"]
paths:
- "Sources/**/*.swift"
- "Tests/**/*.swift"
- "**/*.md"
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy-pages:
name: Deploy Documentation to GitHub Pages
runs-on: macos-14
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
steps:
- name: Configure Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache SPM dependencies
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Build DocC
run: Scripts/build-docc-archive HPOpenWeather
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ runner.temp }}/docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4