Merge pull request #462 from Avdan-OS/dependabot/npm_and_yarn/src/mul… #290
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NPM Dev site Deploy | |
on: | |
push: | |
branches: ["dev"] | |
paths: | |
- "src/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "src" # Here the path to the folder where package-lock.json is located. | |
strategy: | |
matrix: | |
node-version: [16.x] # Are you are missing this specification? | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: "**/package-lock.json" # THIS PATTERN did the trick for me. | |
- run: npm install && npx next build && npx next export && touch out/.nojekyll | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
folder: src/out | |
branch: main # The branch the action should deploy to. |