diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..0349e50 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -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 "" > 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 \ No newline at end of file