mirror of
https://github.com/zhigang1992/Boutique.git
synced 2026-01-12 22:46:10 +08:00
Adding documentation workflow
This commit is contained in:
@@ -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
35
.github/workflows/documentation.yml
vendored
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user