Skip to content

Merge testing and profiling (#118) #85

Merge testing and profiling (#118)

Merge testing and profiling (#118) #85

name: "Docs"
on:
push:
branches: [master]
permissions:
contents: read
pages: write
id-token: write
jobs:
handle-push-to-master:
runs-on: ubuntu-latest
steps:
- name: Fetch repo
uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build tests
run: nix build .#testing
- name: Run tests
run: nix run .#testing
- name: Build documntation
run: nix build .#documentation
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: github-pages
path: result/_site/
- name: Check if docs sources changed
uses: dorny/paths-filter@v3
id: srcChanges
with:
filters: |
isChangedDocs:
- 'QA/**'
- name: Build ClickHaskell-dist
run: nix build .#ClickHaskell-dist
- name: Deploy ClickHaskell release candidate
uses: haskell-actions/hackage-publish@v1
with:
hackageToken: ${{ secrets.HACKAGE_API_KEY }}
packagesPath: result/packages
docsPath: result/docs
publish: false
outputs:
isDeployRequiredDocs:
${{ steps.srcChanges.outputs.isChangedDocs }}
deploy-docs:
needs: [handle-push-to-master]
runs-on: ubuntu-latest
if: needs.handle-push-to-master.outputs.isDeployRequiredDocs == 'true'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}