Skip to content

Commit

Permalink
Use spago docs to generate docs on gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
nwolverson committed Feb 4, 2022
1 parent b0cd288 commit 348b3b1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 {} \;'
Expand Down
9 changes: 9 additions & 0 deletions allPackages.dhall
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 348b3b1

Please sign in to comment.