-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (48 loc) · 1.26 KB
/
publish_docs.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: Generate Documentation
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
Build:
runs-on: macos-15
steps:
- name: Install SourceKitten
run: brew install sourcekitten
- name: Install Jazzy
run: sudo gem install jazzy
# They don't support Swift 6 yet.
# https://github.com/swift-actions/setup-swift/issues/683
# - name: Install Swift
# uses: swift-actions/setup-swift@v2
# with:
# swift-version: "5.10.0"
- name: Confirm Swift Version
run: swift --version
- name: Install Swiftarr Dependencies
run: brew install gd
- name: Checkout Swiftarr
uses: actions/checkout@v2
- name: Generate Docs
run: scripts/generatedocs.sh
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: docs/Output
deploy:
if: github.repository == 'jocosocial/swiftarr' && github.ref == 'refs/heads/master'
needs: Build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4