diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..35fe7716 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,18 @@ + +name: Deploy + +on: + push: + branches: [ "main" ] + +jobs: + deploy: + + runs-on: ubuntu-latest + + + steps: + - uses: actions/checkout@v4 + - run: docker build . -t harishneel/next-js-app + - run: echo "${{secrets.DOCKERHUB_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin + - run: docker push harishneel/next-js-app:latest \ No newline at end of file diff --git a/app/counter.test.tsx b/app/counter.test.tsx index 8488296a..2d3b111c 100644 --- a/app/counter.test.tsx +++ b/app/counter.test.tsx @@ -8,5 +8,5 @@ it("App Router: Works with Client Components (React State)", () => { render(); expect(screen.getByRole("heading")).toHaveTextContent("0"); fireEvent.click(screen.getByRole("button")); - expect(screen.getByRole("heading")).toHaveTextContent("1"); + expect(screen.getByRole("heading")).toHaveTextContent("11"); });