Skip to content

Commit

Permalink
documentation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilioPelaez committed Dec 25, 2024
1 parent 972cf57 commit 7c837af
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Documentation

on:
push:
tags:
- '*'
workflow_dispatch:

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

# Allow one concurrent deployment. Do not cancel in-flight deployments because we don't want assets to be in a
# a semi-deployed state.
concurrency:
group: "documentation"
cancel-in-progress: false

jobs:
deploy-documentation:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Up GitHub Pages
uses: actions/configure-pages@v3
- name: Build Documentation
uses: fwcd/swift-docc-action@v1
with:
target: HierarchyResponder
output: build
transform-for-static-hosting: 'true'
disable-indexing: 'true'
hosting-base-path: public
- name: Create index.html
run: |
echo "<script>window.location.href += \"/documentation/hierarchyresponder\"</script>" > public/index.html;
- name: Upload Documentation Artifact to GitHub Pages
uses: actions/upload-pages-artifact@v1
with:
path: public
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 7c837af

Please sign in to comment.