Use Swift Package Index for docs

This commit is contained in:
Sindre Sorhus 2022-07-07 20:29:22 +02:00
parent 1522654b59
commit 0994810987
5 changed files with 5 additions and 40 deletions

View File

@ -1,22 +0,0 @@
name: Generate documentation
on:
release:
types: [published]
jobs:
deploy:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: DocC
run: >
swift package --allow-writing-to-directory docs
generate-documentation --target KeyboardShortcuts
--disable-indexing
--transform-for-static-hosting
--hosting-base-path KeyboardShortcuts
--output-path docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: '.'

4
.spi.yml Normal file
View File

@ -0,0 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: ['KeyboardShortcuts']

View File

@ -1,14 +0,0 @@
{
"pins" : [
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-plugin",
"state" : {
"revision" : "3303b164430d9a7055ba484c8ead67a52f7b74f6",
"version" : "1.0.0"
}
}
],
"version" : 2
}

View File

@ -15,9 +15,6 @@ let package = Package(
]
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
],
targets: [
.target(
name: "KeyboardShortcuts"

View File

@ -155,7 +155,7 @@ This package supports [localizations](/Sources/KeyboardShortcuts/Localization).
## API
[See the API docs.](https://sindresorhus.com/KeyboardShortcuts/documentation/keyboardshortcuts/keyboardshortcuts)
[See the API docs.](https://swiftpackageindex.com/sindresorhus/keyboardshortcuts/main/documentation/keyboardshortcuts/keyboardshortcuts)
## Tips