Skip to content

Commit

Permalink
PLT-5743 - Deploy Haddock GitHub page (#223)
Browse files Browse the repository at this point in the history
* PLT-5743 - Figuring out how to deploy a Haddock Github Page

PLT-5743 - Removed this branch from the on-push trigger

PLT-5743 - Trying again with the push trigger

PLT-5743 - Bump to trigger the on-push again

PLT-5743 - Testing the site generation

PLT-5743 - Try cabal update first

PLT-5743 - Try entering the shell explicitly

PLT-5743 - Another attempt...

PLT-5743 - Maybe this will make things faster

PLT-5743 - Make sure the config's loaded

PLT-5743 - Another attempt to get this working

PLT-5743 - Try it with the original config

PLT-5743 - Added debugging line to workflow

PLT-5743 - Trying another debugging line in the workflow

PLT-5743 - More workflow debugging

PLT-5743 - Check where cabal comes from

PLT-5743 - Try --pure

PLT-5743 - Try unsetting the path, --pure doesn't seem to work

PLT-5743 - Use --ignore-environment instead of just unsetting path

PLT-5743 - See what's on the path

PLT-5743 - Try quick-install again

PLT-5743 - Try with --command

PLT-5743 - Use nix-action again

PLT-5743 - Fix the --command arg

PLT-5743 - Add -i back in

PLT-5743 - Try removing ghcup so I can still have access to the path

PLT-5743 - Try updating cabal and check its location

PLT-5743 - Just produce haddock for core and chain-index

PLT-5743 - Make the correct dirs

PLT-5743 - Try just marconi-core

PLT-5743 - Add chain-index back in

PLT-5743 - Pre-readiness check (final apart from branches)

PLT-5743 - Removed this branch from on-push list

* PLT-5743 - Fixed silly typo

* PLT-5743 - One last test

* PLT-5743 - Fix one more typo and remove debug line

* PLT-5743 - Once again, remove this branch from the on-push trigger

* PLT-5743 - Added a reference to the Haddock links in the readme

* PLT-5743 - README formatting fix
  • Loading branch information
willjgould authored Nov 1, 2023
1 parent 830f9ea commit 2421893
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/haddock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Build and Deploy to Github Pages"
on:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
jobs:
build-haddock-site:
runs-on: ubuntu-latest
permissions:
contents: write
environment:
name: github-pages
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
experimental-features = nix-command flakes
accept-flake-config = true
- name: Build haddock site
run: |
ghcup nuke
nix develop --command bash -c '
cabal update
cabal haddock marconi-core
cabal haddock marconi-chain-index
cabal haddock marconi-core-json-rpc
'
mkdir dist
mkdir dist/marconi-core
mkdir dist/marconi-chain-index
mkdir dist/marconi-core-json-rpc
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-core-1.2.0.0/doc/html/marconi-core/* ./dist/marconi-core
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-chain-index-1.2.0.0/doc/html/marconi-chain-index/* ./dist/marconi-chain-index
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-core-json-rpc-1.2.0.0/doc/html/marconi-core-json-rpc/* ./dist/marconi-core-json-rpc
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
target-folder: ${{ github.ref_name }}
6 changes: 5 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ The more in-depth user documentation is available in our http://example.com/TODO

=== Haddock documentation

The Haskell API documentation (Haddock) for the Marconi libraries are hosted http://example.com/TODO[here].
The Haskell API documentation (Haddock) for the Marconi libraries is hosted here:

* https://input-output-hk.github.io/marconi/main/marconi-core[marconi-core]
* https://input-output-hk.github.io/marconi/main/marconi-chain-index[marconi-chain-index]
* https://input-output-hk.github.io/marconi/main/marconi-core-json-rpc[marconi-core-json-rpc]

You may generate them directly with `Cabal` for each component:

Expand Down

0 comments on commit 2421893

Please sign in to comment.