Skip to content

Add Github Pull Request Template #61

Add Github Pull Request Template

Add Github Pull Request Template #61

Workflow file for this run

name: Github Pages
on:
push:
branches: [ "master" ]
workflow_dispatch:
jobs:
gh-pages:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
substituters = https://cache.iog.io https://cache.nixos.org/ https://cache.zw3rk.com
- name: Build projects and haddocks
run: nix develop --command bash -c "cabal update && cabal build --enable-documentation all && ./scripts/haddocks.sh"
- name: Add files
run: |
git config --local user.name ${{ github.actor }}
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
# Start a new version of the gh-pages branch
git for-each-ref refs/heads/gh-pages --format='%(refname:short)' |
while read -r REFNAME; do
git branch -D "$REFNAME"
done
git checkout -b gh-pages
git rm -rfq .
git commit -qm "Remove all existing files"
echo "cardano-base.cardano.intersectmbo.org" >CNAME
touch .nojekyll
git add CNAME .nojekyll
git commit -qm "Add CNAME and .nojekyll"
# Add Haddocks
git add -A --force ./haddocks
git mv ./haddocks/* .
git commit -qm "Updated from ${GITHUB_SHA} via ${GITHUB_EVENT_NAME}"
- name: Push to gh-pages
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: .