Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewilliamboswell committed Nov 20, 2023
1 parent 6e17f1e commit 55ce3f3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/generate-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Generate docs

on:
# Run when a release is published
release:
types:
- published

jobs:
generate-docs:
name: Generate docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Install Roc
uses: hasnep/setup-roc@main
with:
roc-version: nightly
- name: Generate docs
run: roc docs package/main.roc
- name: Fix absolute paths
run: |
find generated-docs/ -type f -name '*.html' -exec sed -i "s/\(href\|src\)=\"\//\1=\"\/${{ github.event.repository.name }}\//g" {} +
- name: Upload docs artifact
uses: actions/upload-pages-artifact@v1
with:
path: generated-docs
- name: Deploy docs
uses: actions/deploy-pages@v2

0 comments on commit 55ce3f3

Please sign in to comment.