Skip to content
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

Docs: Caching in GitHub Actions with Bun #57079

Open
satelllte opened this issue Oct 19, 2023 · 2 comments
Open

Docs: Caching in GitHub Actions with Bun #57079

satelllte opened this issue Oct 19, 2023 · 2 comments
Labels
Documentation Related to Next.js' official documentation. good first issue Easy to fix issues, good for newcomers

Comments

@satelllte
Copy link

What is the improvement or update you wish to see?

It would be helpful to know what's the official way to cache Next.js files for subsequent builds with Bun in GitHub Actions:
https://nextjs.org/docs/pages/building-your-application/deploying/ci-build-caching#github-actions

🙏🏻

Is there any context that might help us understand?

I'm receiving this warning during next build step in GitHub Actions, when running it with Bun:

- warn No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache

In my case, it takes around 50s to build the Next app, which can be improved with caching, I believe

Does the docs page already exist? Please link to it.

No response

@satelllte satelllte added the Documentation Related to Next.js' official documentation. label Oct 19, 2023
@leerob leerob added the good first issue Easy to fix issues, good for newcomers label Jan 6, 2024
@JCharante
Copy link
Contributor

I've gotten caching working in github actions with bun and I'm working on putting together a POC for verification & to update the documentation.

@krish1209
Copy link

krish1209 commented Jan 15, 2024

I am not sure but I believe there is no official documentation which specifically mentions about caching Next.js files for builds with BUN in github actions.
However you can try the actions/cache action. Editing the YAML file

  • name: Cache Node.js modules and Next.js build
    uses: actions/cache@v3
    with:
    path: |
    ~/.npm
    /.next/cache
    key: ${{ runner.os }}-nextjs-${{ hashFiles('
    /package-lock.json') }}-${{ hashFiles('/yarn.lock') }}
    restore-keys: |
    ${{ runner.os }}-nextjs-${{ hashFiles('
    /package-lock.json') }}-

You would also need to try to check the correct path or key value in the actions/cahe config.
Although i believe @JCharante would write the exact documentation on how to make quicker builds.

I am just starting my WebD journey so please be gentle :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Related to Next.js' official documentation. good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants