Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 24 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,43 @@ on:
branches: [main]
workflow_dispatch:

# Cancel previous run (see: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)
permissions:
contents: read
pages: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: pages
cancel-in-progress: true

env:
GITHUB_PAGES: true

jobs:
build:
uses: pmndrs/docs/.github/workflows/build.yml@v3
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We keep deploying to the current website.
So, please do not modify workflows/docs.yml and make it work.

Create a new workflows/website.yml for rspress.

Copy link
Copy Markdown
Collaborator Author

@dbritto-dev dbritto-dev Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dai-shi can't be separated because both use gh pages to publish the website. I could try to publish both under different paths but that would be tricky to implement

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I wasn't aware that gh pages is conflicting. Hmm.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with:
mdx: 'docs'
libname: 'Zustand'
home_redirect: '/learn/getting-started/introduction'
icon: '/favicon.ico'
logo: '/bear.jpg'
github: 'https://github.com/pmndrs/zustand'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 20
cache: pnpm
- run: pnpm --dir website install
- run: pnpm --dir website build
- uses: actions/upload-pages-artifact@v4
with:
path: website/doc_build

deploy:
needs: build
runs-on: ubuntu-latest

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
uses: actions/deploy-pages@v4
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep using commit hash for this and others.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="./docs/bear.jpg" />
<img src="./docs/public/bear.jpg" />
</p>

[![Build Status](https://img.shields.io/github/actions/workflow/status/pmndrs/zustand/test.yml?branch=main&style=flat&colorA=000000&colorB=000000)](https://github.com/pmndrs/zustand/actions?query=workflow%3ATest)
Expand Down
2 changes: 1 addition & 1 deletion docs/learn/getting-started/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nav: 1
---

<div class="flex justify-center mb-4">
<img src="../../bear.jpg" alt="Logo Zustand" />
<img src="../../public/bear.jpg" alt="Logo Zustand" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we keep the original position? If it's a hard requirement of rspress, I may consider a symbolic link as a last resort.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dai-shi hard requirement, should be under docs/public

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbritto-dev Can we copy ./docs/bear.jpg ./docs/public/bear.jpg in the GitHub Action?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dai-shi sure, we can do that

</div>

A small, fast, and scalable bearbones state management solution.
Expand Down
File renamed without changes
File renamed without changes.
Loading
Loading