Update list of applications #224
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: Generate and deploy documentation | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
GenDoc: | |
name: Generate documentation | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: haskell/actions/setup@v1 | |
with: | |
ghc-version: '9.2.1' | |
- name: Generate documentation | |
run: | | |
cabal haddock \ | |
--haddock-html \ | |
--haddock-option "--odir=doc" \ | |
--haddock-option "--title=blarney" \ | |
--haddock-option "--source-module=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$GITHUB_SHA/%{FILE}" \ | |
--haddock-option "--source-entity=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$GITHUB_SHA/%{FILE}#L%{LINE}" \ | |
- name: Upload documentation artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: doc | |
path: doc | |
PublishDoc: | |
name: Publish documentation | |
needs: GenDoc | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download documentation artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: doc | |
- name: Deploy documentation | |
run: | | |
git init | |
git checkout --orphan haddock | |
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
git config user.name the-blarney-fairy | |
git config user.email the-blarney-fairy@users.noreply.github.com | |
git add --all | |
git commit -m "deploy documentation for $GITHUB_SHA" | |
git push origin -f haddock |