Skip to content

Commit

Permalink
chore: add new step to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
davidalves1 committed Nov 2, 2023
1 parent dada8aa commit bc3eea8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,40 @@ 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@v4
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: 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 --build --debug
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
6 changes: 5 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[[plugins]]
package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-nextjs"

[build]
command = "yarn build"
publish = ".next"

0 comments on commit bc3eea8

Please sign in to comment.