Adding documentation workflow

This commit is contained in:
Joe Fabisevich
2022-08-07 21:21:52 -04:00
parent 241032b2dc
commit 331239f1f3
2 changed files with 37 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
name: Swift
name: Build and Test
on:
push:
@@ -7,8 +7,7 @@ on:
branches: [ main ]
jobs:
build:
build-and-test:
runs-on: macos-12
steps:
@@ -18,9 +17,3 @@ jobs:
- name: Run tests
run: swift test -v
- uses: fwcd/swift-docc-action@v1
with:
target: Bodega
output: ./docs
disable-indexing: 'true'
transform-for-static-hosting: 'true'

35
.github/workflows/documentation.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Documentation
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
update_documentation:
name: Update documentation
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Swift version
uses: swift-actions/setup-swift@v1
with:
swift-version: "5.6"
- name: Generate documentation
uses: fwcd/swift-docc-action@v1
with:
target: Boutique
output: ./docs
hosting-base-path: Boutique
disable-indexing: 'true'
transform-for-static-hosting: 'true'
- name: Commit documentation
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add ./docs/**
git commit -m "Generating documentation"
git push