【发布时间】:2020-04-29 09:50:54
【问题描述】:
我真的是 DevOps 世界的新手,我想在水中试一试。这就是为什么我一直在尝试设置一个简单的 GitHub Action,当我推送到 master 时,我的网站会自动部署到 Firebase,但在构建阶段出现问题:
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.
这是我的基本工作流程:
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/firebase-action@v1.1.0
with:
args: deploy
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: chez-mout
是不是我做错了什么?
【问题讨论】:
标签: npm devops github-actions