Skip to content

Commit

Permalink
Create dedicated workflow to publish the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcristea committed Jan 11, 2024
1 parent a0c7779 commit 6b4fb19
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,3 @@ jobs:
run: |
xcrun llvm-cov export -format="lcov" .build/debug/PeppermintPackageTests.xctest/Contents/MacOS/PeppermintPackageTests -instr-profile .build/debug/codecov/default.profdata > .build/PeppermintPackageTests.lcov
bash <(curl https://codecov.io/bash)
- name: Docs
uses: fwcd/swift-docc-action@v1
with:
target: Peppermint
output: ./docs
hosting-base-path: pappermint
disable-indexing: "true"
transform-for-static-hosting: "true"
53 changes: 53 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docs

on:
push:
branches:
- main
workflow_dispatch:

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

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
docs:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Pages
uses: actions/configure-pages@v1
- name: Set up Swift
uses: fwal/setup-swift@v1
with:
swift-version: "5.6"
- name: Generate Docs
uses: fwcd/swift-docc-action@v1
with:
target: Peppermint
output: ./docs
transform-for-static-hosting: "true"
disable-indexing: "true"
hosting-base-path: peppermint
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: docs

steps:
- name: Deploy Docs
uses: actions/deploy-pages@v1

0 comments on commit 6b4fb19

Please sign in to comment.