Skip to content

Commit

Permalink
Merge pull request #101 from shimastripe/feature/docc
Browse files Browse the repository at this point in the history
Support docc github documentation
  • Loading branch information
shimastripe authored Sep 14, 2024
2 parents 6fdfaf0 + 74907a6 commit d6061fb
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
schedule:
- cron: '25 0 * * 0'

concurrency:
group: "codeql"
cancel-in-progress: false

jobs:
analyze:
name: Analyze
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/deploy_docc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy DocC

on:
push:
branches: ["main"]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "docc"
cancel-in-progress: false

jobs:
build:
runs-on: macos-14
env:
DEVELOPER_DIR: "/Applications/Xcode_16.0.app/Contents/Developer"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build DocC
run: |
make build_docc
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs
deploy:
runs-on: macos-14
env:
DEVELOPER_DIR: "/Applications/Xcode_16.0.app/Contents/Developer"
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
.PHONY: format
format:
xcrun --sdk macosx swift-format swift-format -p -r -i .
xcrun --sdk macosx swift-format swift-format -p -r -i .

.PHONY: build_docc
build_docc:
swift package \
--allow-writing-to-directory ./docs \
generate-documentation \
--output-path ./docs \
--disable-indexing \
--symbol-graph-minimum-access-level internal \
--include-extended-types \
--enable-experimental-combined-documentation \
--target IAPClient \
--target IAPCore \
--target IAPInterface \
--target IAPModel \
--target IAPView \
--transform-for-static-hosting \
--hosting-base-path InAppPurchaseViewer

1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ let package = Package(
.package(url: "https://github.com/sparkle-project/Sparkle", exact: "2.6.4"),
.package(url: "https://github.com/pointfreeco/swift-dependencies", exact: "1.4.0"),
.package(url: "https://github.com/apple/swift-http-types", exact: "1.3.0"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", exact: "1.4.3"),
],
targets: [
.target(
Expand Down

0 comments on commit d6061fb

Please sign in to comment.