-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(docs): migrate docs to rspress #3432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 8 commits
9aaafcb
bde0dcd
c2ea336
b869e31
1c1ad6d
5c15482
2101553
c78643e
41ac508
6afbb36
b0da7f3
4e5f20b
859ff58
cc627f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep using commit hash for this and others. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dai-shi hard requirement, should be under
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
|
||
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#3432 (comment)