Skip to content

chore: Fix hosting path in published documentation. (#56) #2

chore: Fix hosting path in published documentation. (#56)

chore: Fix hosting path in published documentation. (#56) #2

Workflow file for this run

name: Publish Docs
on:
# Runs on pushes targeting the default branch
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:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-12
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Package documentation 🛠
run: |
export DOCC_JSON_PRETTYPRINT="YES"
swift package \
--allow-writing-to-directory ./docs \
generate-documentation --target WMATAUI \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path WMATAUI.swift \
--output-path ./docs
- name: Upload artifact 📜
uses: actions/upload-pages-artifact@v1
with:
# Upload docs directory
path: 'docs'
- name: Deploy to GitHub Pages 🐙
id: deployment
uses: actions/deploy-pages@v1