From 5d5aa1deac1db666f853fdceb86586a5baf11860 Mon Sep 17 00:00:00 2001 From: davidalves1 Date: Thu, 2 Nov 2023 21:13:44 +0000 Subject: [PATCH] chore: add new step to CI --- .github/workflows/pull-request.yml | 34 ++++++++++++++++++++++++------ README.md | 6 ++++++ netlify.toml | 2 -- 3 files changed, 34 insertions(+), 8 deletions(-) delete mode 100644 netlify.toml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 023df38..f825f38 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -11,21 +11,43 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [18] steps: - - uses: actions/checkout@v3 - - name: Use NodeJS ${{ matrix.node-version }} + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup NodeJS ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'yarn' + - name: Caching dependencies + uses: actions/cache@v3 + id: yarn-cache + with: + path: '**/node_modules' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: ${{ runner.os }}-yarn- + - name: Install packages - run: yarn install --frozen-lockfile --prefer-offline + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile - - name: Test - run: yarn test:cov + # - name: Lint + # run: yarn lint + + # - name: Test + # run: yarn test:cov - name: Build run: yarn build + + - name: Publish preview to Netlify + uses: netlify/actions/cli@master + with: + args: deploy --dir=.next --debug + env: + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} diff --git a/README.md b/README.md index b3ec96a..c3448ee 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,12 @@ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +## Deploy on Netlify manually + +https://github.com/netlify/next-runtime#manually-installing-the-nextjs-runtime +https://paulonteri.com/thoughts/how-to/deploy-nextjs-to-netlify-manually + + ## License This project is licensed under the [MIT License](LICENSE). diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index eb9150b..0000000 --- a/netlify.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[plugins]] - package = "@netlify/plugin-nextjs"