Skip to content

Commit

Permalink
Add docs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Lefkowitz committed Apr 20, 2024
1 parent 75a8206 commit cf4496d
Show file tree
Hide file tree
Showing 7 changed files with 987 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:

- name: Install PureScript dependencies
shell: bash
run: spago install
run: yarn spago install

- name: Install trufflehog3
shell: bash
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Docs

on:
push:
tags:
- "*.*.*"

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/install

- name: Setup GitHub Pages
uses: actions/configure-pages@v4

- name: Build the docs
run: yarn spago docs

- name: Upload the artifacts
uses: actions/upload-pages-artifact@v3
with:
path: "generated-docs/html"

deploy:
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
needs: build

environment:
name: Pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
run: npm run lint

- name: Run tests
run: spago test
run: yarn spago test
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
npm run lint
spago test
yarn spago test
3 changes: 2 additions & 1 deletion .trufflehog3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ exclude:

- message: Tooling outputs
paths:
- output/cache-db.json
- generated-docs
- output
- spago.lock
- yarn-error.log
- yarn.lock
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ show decoded
To run tests:

```bash
spago test
yarn spago test
```

### Documentation

To generate the documentation locally:

```bash
spago docs
yarn spago docs
```

### Linters
Expand Down
Loading

0 comments on commit cf4496d

Please sign in to comment.