-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e17f1e
commit 55ce3f3
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |