From 348b3b1adc1da2e8a6355416578e50c140555e3f Mon Sep 17 00:00:00 2001 From: Nicholas Wolverson Date: Fri, 4 Feb 2022 15:42:57 +0000 Subject: [PATCH] Use spago docs to generate docs on gh pages --- .github/workflows/release.yml | 16 +++++++--------- Makefile | 4 ++-- allPackages.dhall | 9 +++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 allPackages.dhall diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6334340..dfe7a6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: run: | nix-shell --run '>packages.dhall dhall <<< ./src/packages.dhall' - name: generate docs - run: nix-shell --run 'make pursuit' + run: nix-shell --run 'make docs' - name: Create Release id: create_release uses: actions/create-release@v1 @@ -36,12 +36,10 @@ jobs: asset_path: ./packages.dhall asset_name: packages.dhall asset_content_type: application/x-dhall - - name: upload pursuit docs - uses: appleboy/scp-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - key: ${{ secrets.KEY }} - source: "data/*" - target: "~" + - name: Upload Docs to GH Pages + uses: JamesIves/github-pages-deploy-action@v4.2.3 + with: + branch: gh-pages + folder: generated-docs/html/ + target-folder: docs/ diff --git a/Makefile b/Makefile index 0207d17..5581c6b 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ ci: generate # TODO spago verify & backend # cd src && spago verify-set -pursuit: generate - package-set-pursuit +docs: generate + spago -x allPackages.dhall docs format: @nix-shell --run 'find src/ -iname "*.dhall" -exec dhall format --inplace {} \;' diff --git a/allPackages.dhall b/allPackages.dhall new file mode 100644 index 0000000..e6d599d --- /dev/null +++ b/allPackages.dhall @@ -0,0 +1,9 @@ +let packages = ./packages.dhall +let Package = ./src/Package.dhall +let Prelude/Map/keys = https://raw.githubusercontent.com/dhall-lang/dhall-lang/v21.1.0/Prelude/Map/keys.dhall sha256:d13ec34e6acf7c349d82272ef09a37c7bdf37f0dab489e9df47a1ff215d9f5e7 +in +{ name = "all-packages" +, dependencies = Prelude/Map/keys Text Package (toMap packages) +, packages = packages +, sources = [] : List Text +}