Skip to content

Commit

Permalink
ci: add github pages publish docs job
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hm committed Aug 2, 2024
1 parent 86a7d5f commit 5bbcb01
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Generate and deploy docs to pages

on:
pull_request:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm ci
- run: npm run builddocs
- uses: actions/upload-artifact@v3
with:
name: docs
path: ./docs
retention-days: 1

deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@v3
with:
name: docs
path: ./docs
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: './docs'
- uses: actions/deploy-pages@v4
id: deployment
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function Home() {
```
5. Next run your app and click "Store". After a few seconds you should see `Status: succcess` and `Id: <uuid>` rendered. Complete examples are available at [examples/react](./examples/react) or [examples/nextjs](./examples/nextjs).
5. Next run your app and click "Store". After a few seconds you should see `Status: succcess` and `Id: <uuid>` rendered. Complete examples are available at [examples/react](https://github.com/NillionNetwork/client-ts/tree/main/examples/react) or [examples/nextjs](https://github.com/NillionNetwork/client-ts/tree/main/examples/nextjs).
## Packages and package hierarchy
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"exclude": [
"docs",
"examples",
"node_modules"
]
}

0 comments on commit 5bbcb01

Please sign in to comment.