Add ghc of nixpkgs to haskell-nix #2654
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: nix-haddock-linux | |
# If you need to debug this action, use following action. | |
# on: [push, pull_request] | |
on: [push, pull_request] | |
env: | |
NIX_OPTIONS: -L -j 1 --impure | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: free disk space | |
run: | | |
sudo swapoff -a | |
sudo rm -f /swapfile | |
sudo apt -y purge ghc* cabal-install* php* || true | |
sudo apt autoremove -y || true | |
sudo apt autoclean -y || true | |
docker rmi $(docker image ls -aq) | |
df -h | |
- uses: cachix/install-nix-action@v18 | |
- run: nix-env -iA cachix -f https://cachix.org/api/v1/install | |
- run: cachix use hasktorch | |
- run: | | |
nix build .#haddocks-join $NIX_OPTIONS | |
pwd | |
find result/ |head | |
mkdir public | |
cp -r ./result/share/doc/* public/ | |
- name: copy tutorial files | |
run: | | |
git clone -b tutorial --depth=1 https://github.com/hasktorch/hasktorch.github.io.git | |
cp -r hasktorch.github.io/tutorial public/ | |
- name: Deploy | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
# personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
external_repository: hasktorch/hasktorch.github.io | |
publish_branch: master | |
publish_dir: ./public |