I'm really new to the world of DevOps and want to dip my toes in the water. That's why I've been trying to set up a simple GitHub Action where my site automatically gets deployed to Firebase when I push to master but something goes wrong during the build phase:
Run npm run build
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/runner/work/ChezMout/ChezMout/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/runner/work/ChezMout/ChezMout/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2020-01-12T12_04_27_341Z-debug.log
##[error]Process completed with exit code 254.
This is my basic workflow:
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to Firebase
uses: w9jds/[email protected]
with:
args: deploy
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: chez-mout
Is there something I'm doing blatantly wrong?
npm install
is unable to find the package.json
file. Please make sure it exists in the root folder of your repository. (And is under version control and valid).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With