Skip to content

Commit

Permalink
Update deploy-dooc.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rismay authored Jun 30, 2024
1 parent 2bea6b9 commit 97627af
Showing 1 changed file with 39 additions and 8 deletions.
47 changes: 39 additions & 8 deletions .github/workflows/deploy-dooc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,57 @@ on:
push:
branches: [ main ]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy_docs:
strategy:
matrix:
os:
- macos-14
runs-on: ${{ matrix.os }}
create_docs:
runs-on: macos-14

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Pages
uses: actions/configure-pages@v1
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
if: matrix.os == 'macos-latest' || matrix.os == 'macos-14' || matrix.os == 'self-hosted'
with:
xcode-version: '16.0.0-beta'
- name: Build Documentation
run: 'swift package --allow-writing-to-directory ./docs generate-documentation --target WrkstrmLog --output-path ./docs'
- name: Generate Docs
uses: fwcd/swift-docc-action@v1
with:
target: WrkstrmLog
output: ./public
transform-for-static-hosting: 'true'
disable-indexing: 'false'
hosting-base-path: wrkstrm-log
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-14
needs: create_docs

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

0 comments on commit 97627af

Please sign in to comment.