Skip to content

Merge pull request #34 from imclerran/update-docs #8

Merge pull request #34 from imclerran/update-docs

Merge pull request #34 from imclerran/update-docs #8

Workflow file for this run

name: Generate docs
on:
release:
types:
- published
workflow_dispatch:
push:
branches:
- main
jobs:
generate-docs:
name: Generate docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Check out the repository
uses: actions/[email protected]
- name: Install Roc
uses: hasnep/[email protected]
with:
roc-version: nightly
- name: Generate docs
run: roc docs package/main.roc
- name: List contents of generated-docs directory (before fix paths)
run: ls -R generated-docs
- 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: List contents of generated-docs directory (after fix paths)
run: ls -R generated-docs
- name: Upload docs artifact
uses: actions/[email protected]
with:
path: generated-docs
- name: Deploy docs
uses: actions/[email protected]
environment:
name: github-pages