sidebase / nuxt-session

Nuxt session middleware to get a persistent session per app user, e.g., to store data across multiple requests. The nuxt session module provides the useSession() composable out of the box and sets up API endpoints to interact with your session to make working with sessions feel like a breeze.
https://sidebase.io/nuxt-session/
MIT License
188 stars 19 forks source link

Added demo docs and sync workflow #39

Closed zoey-kaiser closed 1 year ago

zoey-kaiser commented 1 year ago

WIP

zoey-kaiser commented 1 year ago

This PR currently runs a Github Action called "Sync Docs". What it does it open a PR on https://github.com/sidebase/docs.

It adds:

Files from .docs/content to content/nuxt-session - For the READMEs Files from .docs/public to public - For any Images used in the docs

Once you merge the new docs in the repestive module repo, you can merge the created PR, to pull the changes onto the Website. We can then add a Action there, to update the website automatically!

Checkout the PR, this PR created: https://github.com/sidebase/docs/pull/2 - Changing anything to the docs in this PR will also update the files in the PR in the docs repo.

Currently todo:

BracketJohn commented 1 year ago

Thanks!

zoey-kaiser commented 1 year ago

Is there a remaining reason for putting the docs into a "secret" .docs folder?

I was doing it the way that the docus repo did it: https://github.com/nuxt-themes/docus/tree/dev/.docs But in the end we can also make it just docs!

How can we enable "auto-merge" so that the syncing does not need manual action?

I was thinking about this. I assume we could enable auto-merge from GitHub. Meaning, if there are no conflicts and the CI passes, it would get merged. I can play with these settings and find a way to get it working!

Are you blocked here by me in any way atm?

I would not say so. I just wanted to ensure you had a look at my PoC. If you are happy with the implementation we can move forward to:

An issue I am still facing in this repo is this: https://github.com/nuxt-themes/docus/issues/680. The docus team recommended we upgrade the module to Nuxt3 stable. I will add a new PR in nuxt-auth and see if that resolves it, as we already upgraded there!

BracketJohn commented 1 year ago

But in the end we can also make it just docs!

yeah,. let's move to just docs

I was thinking about this. I assume we could enable auto-merge from GitHub. Meaning, if there are no conflicts and the CI passes, it would get merged. I can play with these settings and find a way to get it working!

this is essential, else the whole sync-workflow will not have solved the problem that contributions to docs in repo A need manual steps (that will be forgotten or too tedious for outside / inside collaborators) in order to go-live.

I would not say so. I just wanted to ensure you had a look at my PoC. If you are happy with the implementation we can move forward to:

let's adapt thjis a bit:

  1. get auto-sync without human inference to work (remember: this was a requirement I posed to accept this solution)
  2. get this pr merged
  3. see if the sync workflow works
  4. test out npm run build && npm run preview in the docs repo to see that everything works in theory
  5. then in parallel:
    • get @DeusAvalon to deploy it into the cluster with CD
    • do the docs PRs on other repos
zoey-kaiser commented 1 year ago

This PR is a lot bigger than sidebase/nuxt-parse#3 - is this on purpose?

In the nuxt-parse PR the package.lock.json was missing. Therefore the big difference. As docus is currently not working anyway in these PRs and will need to be refactored, we could either delete the package-lock or ignore it.

BracketJohn commented 1 year ago

Let's ignore and keep it for now, thanks. Please delete the env file so that we can contuinue

zoey-kaiser commented 1 year ago

Let's ignore and keep it for now, thanks. Please delete the env file so that we can contuinue

Deleted!