# Issues with continues deployment in Netflify

**URL:** <https://community.prismic.io/t/issues-with-continues-deployment-in-netflify/14638>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [December 1, 2023, 12:02am UTC](https://community.prismic.io/t/issues-with-continues-deployment-in-netflify/14638 "2023-12-01T00:02:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvarocorpeno10](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@alvarocorpeno10](https://community.prismic.io/u/alvarocorpeno10)\
**Post date:** [December 1, 2023, 12:02am UTC](https://community.prismic.io/t/issues-with-continues-deployment-in-netflify/14638/1 "2023-12-01T00:02:54Z")

</div>

So I am working on moving a nextjs site to prismic, and I have setup a test server in netlify, I have created the build hook in netlify and saved it in the webhook in prismic settings. Whenever I make a change in the site I can see that the webhook in prismic is triggered with a 200 status code and a build is started in netlify. However once the build is finished and I reload the page, changes are not displayed. I tried clearing cache and opening in incognito and nothing changes, I can only see the new changes if I manually build the site again with the "clear cache and retry with latest commit" button.

![Screenshot 2023-11-30 180328](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/3/3218caa2d86319e64859c2328b81a61e661b1d7a.png)

 ![Screenshot 2023-11-30 180428](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/f/f4ba591ec91bf9740585df07a0ef1221a656cdfb.png)

I am using a secret and custom tag

 ![Screenshot 2023-11-30 180557](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/2/259a70e6946951858158c046fe4c50a40c27f39c.png)

and here is my api/revalidate/route.js

```auto
import { NextResponse } from "next/server";
import { revalidateTag } from "next/cache"; 

export async function POST(request) {
  const { secret } = await request.json();
  const tag = request.headers.get('tag');

  if (secret !== process.env.REVALIDATION_TOKEN) {
    return NextResponse.json({ message: 'Invalid secret' }, { status: 401 })
  }

  if (!tag) {
    return NextResponse.json(
      { message: "Missing tag header" },
      { status: 400 }
    )
  }

  revalidateTag(tag);

  return NextResponse.json(
    { revalidated: true, now: Date.now() },
    { status: 200 }
  );
}

```

And I have also included the env var in netlify

 ![Screenshot 2023-11-30 181325](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/2/21312b1bd011a011c36b73c69aaef7d2ba8ca8b2.png)

any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![samlittlefair](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/samlittlefair/32/696_2.png) [@samlittlefair](https://community.prismic.io/u/samlittlefair)\
**Post date:** [December 1, 2023, 2:50pm UTC](https://community.prismic.io/t/issues-with-continues-deployment-in-netflify/14638/3 "2023-12-01T14:50:42Z")

</div>

Hi @alvarocorpeno10,

Many users have reported issues with content not updating on Next.js sites. We've been investigating, and we suspect it might be a problem with caching in Next 13 and 14. We've opened an issue on the Next GitHub repository, and it seems like Next has made some moves to address the problem — though it seems like it hasn't gone away entirely.

You can read through the thread here to see if any of these troubleshooting tips might be helpful. You can also check out the linked GitHub issue to upvote and subscribe to updates.

> [@Caching issue with Next.js App Router - Vercel Deployment](https://community.prismic.io/t/caching-issue-with-next-js-app-router-vercel-deployment/13834/23):
>
> I am about to pass off the project to a client. Is there a reliable way to ensure their updates in Prismic get reflected on the frontend? I am getting wildly inconsistent results with the revalidateTag webhook. Should I also trigger a build on the Vercel side after the revalidate endpoint is called? Please help! and Thank you Edit: I would like to add my changes (in even in Production) are reflected in Draft/Preview mode but not on the live site (after publishing).

Sam

---

<div class="post-metadata">

**Author:** ![alvarocorpeno10](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@alvarocorpeno10](https://community.prismic.io/u/alvarocorpeno10)\
**Post date:** [December 2, 2023, 5:09pm UTC](https://community.prismic.io/t/issues-with-continues-deployment-in-netflify/14638/5 "2023-12-02T17:09:50Z")

</div>

Thanks, it seem the access token did it, still have some caching issues but nothing mayor, thanks for the help.  
For anyone else that stumbles on this issue add an access token in prismic settings

 ![Screenshot 2023-12-02 110510](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/9/9e4e189ab34e1592e6e60289e0b6447ef1b44e7f.png)

Add it to the environment variables in netlify site configuration:

 ![Screenshot 2023-12-02 110620](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/5/500eb6d8ed0d5376026c3c3668fb94db1b0b868a.png)

And then modify prismicio.js to use the access token:

 ![Screenshot 2023-12-02 110550](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/9/91e09e9101a53643eba7f489bcc425cba978e0f6.png)

this solved the issue for me.
