Skip to content

Update build-documentation.yml #5

Update build-documentation.yml

Update build-documentation.yml #5

name: Documentation
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
default:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build Documentation
run: |
mkdir docs
swift package \
--allow-writing-to-directory "docs/Hatch" \
generate-documentation \
--target Hatch \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path "/Hatch/docs/Hatch/" \
--output-path "docs/Hatch"
- name: Upload
uses: actions/upload-pages-artifact@v2
with:
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2