aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build_docs.yaml
blob: ee3b9492b3fc8a2b6f7110ff4a8cce9f6a291c3b (plain)
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
name: Publish Documentation

on:
  release:
    types:
      - published
      - edited
  push:
    branches: [ master ]

permissions:
  contents: write

concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

jobs:
  generate-and-publish-docs:
    runs-on: macOS-latest
    steps:
      - name: Get da Code
        uses: actions/checkout@v4
      - name: Setup Swift
        uses: swift-actions/setup-swift@v1.25.0
        with:
          swift-version: '5.9'
      - name: Swift Package Documentation Generator
        uses: sersoft-gmbh/swifty-docs-action@v3.0.0
        with:
          transform-for-static-hosting: true
          hosting-base-path: swift-gopher
          targets:
            - GopherHelpers
            - swift-gopher
            - swiftGopherClient
          output: docs
      - name: Upload docs
        uses: actions/upload-artifact@v1
        if: always()
        with:
          name: docs
          path: docs