add a generic registry type #35
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
haddock: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Haskell Stack | |
uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
stack-version: 'latest' | |
- name: Cache Stack Files | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock', 'package.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-stack- | |
- name: Build Documentation | |
run: | | |
stack build --fast --haddock --no-haddock-deps --no-run-tests | |
# Find documentation directory | |
DIST_DOC=$(find .stack-work/dist -type d -name "html" -print -quit) | |
echo "Distribution docs found at: $DIST_DOC" | |
# Ensure docs exist | |
if [ ! -d "$DIST_DOC/mmm" ]; then | |
echo "Error: Documentation not found at $DIST_DOC/mmm" | |
exit 1 | |
fi | |
# Copy docs | |
mkdir -p public | |
cp -rv "$DIST_DOC/mmm"/* public/ | |
# Verify copy | |
ls -la public/ | |
- name: Deploy to GitHub Pages | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
force_orphan: true | |
enable_jekyll: false | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Haskell Stack | |
uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
stack-version: 'latest' | |
- name: Cache Stack Files | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock', 'package.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-stack- | |
- name: Run Tests | |
run: stack test --fast |