Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
adomurad committed Jul 9, 2024
1 parent fec87bc commit b1345a1
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Bundle

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

jobs:
bundle:
name: Bundle
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Install Roc
uses: hasnep/setup-roc@main
with:
roc-version: nightly
- name: Bundle and release the library
uses: hasnep/[email protected]
with:
library: package/main.roc
token: ${{ github.token }}
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 b1345a1

Please sign in to comment.