Github Action for deploying Angular App to Firebase - No files were found with the provided path: project_name/dist/
- Vorherrschende Sprache
- TypeScript
- Sterne
- 7.8k
- Forks
- 2.2k
- Ø Merge
- 22 Std. 28 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
We are trying to auto-deploy our angular app using GitHub actions on firebase hosting but we are facing an error on the build step for our app showing that An unhandled exception occurred: ENOENT: no such file or directory, stat '/home/runner/work/...../dist'
on GitHub actions, Getting the below error:
```
Run npm run build
> ngx-admin@0.1.0 build
> ng build
Warning: Support was requested for IE 11 in the project's browserslist configuration. IE 11 support is deprecated since Angular v12.
For more information, see https://angular.io/guide/browser-support
- Generating browser application bundles (phase: setup)...
An unhandled exception occurred: ENOENT: no such file or directory, stat '/home/runner/work/project_name/project_name/dist'
See "/tmp/ng-gy4uE4/angular-errors.log" for further details.
Error: Process completed with exit code 127.
```
Please find our GitHub actions .yml file code below:
```
name: Auto Release
on:
push:
branches:
- test_release_branch
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialize Node
uses: actions/setup-node@master
- name: Install Dependencies
run: npm install
- uses: actions/upload-artifact@v2
with:
name: dist
path: dist/
- name: Build
run: npm run build
- name: Deploy
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:site-name
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
```
I can install, build, and deploy manually from my console just fine. I thought this error might have something to do with my dist directory's location on git, Any thoughts on what this might be?
Beitragsleitfaden
Rechercherichtung
Beginne mit dem GitHub Actions YAML in der Issue und verfolge die Reihenfolge der Schritte für Installation, Artefakt-Upload, Build und Deployment. Vergleiche den von Angular gemeldeten Pfad der Build-Ausgabe mit dem vom Workflow und vom Firebase-Deployment verwendeten Pfad. Als abgeschlossen gilt die Aufgabe, wenn der Workflow die erwarteten Distributionsdateien erzeugt und sie erfolgreich deployt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, firebase, github-actions, typescript
- Bereich
- build-system, cloud, devops
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100