Skip to content

Merge pull request #33 from IntersectMBO/coot/codeowners #128

Merge pull request #33 from IntersectMBO/coot/codeowners

Merge pull request #33 from IntersectMBO/coot/codeowners #128

Workflow file for this run

name: "Haddock documentation"
on:
push:
jobs:
haddocks:
name: "Haddocks"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7"]
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- name: Configure to use libsodium
run: |
cat >> cabal.project <<EOF
package cardano-crypto-praos
flags: -external-libsodium-vrf
EOF
- name: Install Haskell
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 3.10.2.0
- name: Set up temp directory
run: |
echo 'TMPDIR=${{ runner.temp }}' >> $GITHUB_ENV
echo 'TMP=${{ runner.temp }}' >> $GITHUB_ENV
- uses: actions/cache@v3
name: Cache cabal store
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: cache-haddock-${{ runner.os }}-${{ matrix.ghc }}-v1-${{ hashFiles('cabal-cache.cabal') }}-${{ github.sha }}
restore-keys: cache-haddock-${{ runner.os }}-${{ matrix.ghc }}-v1-${{ hashFiles('cabal-cache.cabal') }}-
- name: Update Hackage index
run: cabal v2-update
- name: Checkout ouroboros-network repository
uses: actions/checkout@v2
- name: Configure
run: cabal configure --enable-documentation --enable-tests
- name: cabal build --dry-run
run: cabal build --dry-run all
- name: build Haddock documentation 🔧
run: |
mkdir ./haddocks
./scripts/haddocs.sh ./haddocks
- name: deploy to gh-pages 🚀
run: |
git config --local user.email "marcin.szamotulski@iohk.io"
git config --local user.name ${{ github.actor }}
git fetch origin gh-pages:gh-pages
git checkout gh-pages
cp -r ./haddocks/* ./
rm -rf haddocks
git add -A
git commit -m "Deployed haddocks" || true
git push https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git HEAD:gh-pages