Skip to content

use Swift 5.10 to build docs #119

use Swift 5.10 to build docs

use Swift 5.10 to build docs #119

Workflow file for this run

name: Documentation
on:
push:
branches:
- release/4_0
# ^ for now, we only want to use the v4.0 release branch.
jobs:
build:
runs-on: ubuntu-latest
container:
image: swift:5.10
steps:
- uses: actions/checkout@v4
- name: Build Docs
run: |
mkdir -p ./gh-pages
swift package --allow-writing-to-directory ./gh-pages/docs \
generate-documentation --include-extended-types \
--disable-indexing \
--output-path ./gh-pages/docs \
--transform-for-static-hosting \
--hosting-base-path OpenAPIKit \
--target OpenAPIKit
- uses: actions/cache/save@v4
with:
path: gh-pages
key: gh-${{ github.run_number }}-pages
enableCrossOsArchive: true
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/cache/restore@v4
with:
path: gh-pages
key: gh-${{ github.run_number }}-pages
fail-on-cache-miss: true
enableCrossOsArchive: true
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
folder: gh-pages
branch: gh-pages