You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think my .scss files are being compiled to .css at the CI build time.
Here is my main.yml:
name: Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source Git branch
uses: actions/checkout@v2
with:
ref: main
fetch-depth: 10
submodules: true
- name: Compile CSS from SCSS files
uses: gha-utilities/[email protected]
with:
source: ./src/scss/main.scss
destination: ./src/scss/main.css
#Deploys to Heroku
- uses: actions/checkout@v2
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "gh-actions-heroku" #Must be unique in Heroku
heroku_email: "[email protected]"
Here is the github actions output that is working in step: Compile SCSS files to CSS:
Run gha-utilities/[email protected]
Warning: ENOENT: no such file or directory, stat './src/scss/main.css'
Attempting to write to file path -> ./src/scss/main.css
Wrote file -> ./src/scss/main.css
This is the error in the next step (when trying to deploy it to Heroku). It looks like main.css is not created in src/scss at the CI build time since Heroku does not recognize the file?
remote: Failed to compile.
remote: remote: ./pages/_app.tsxremote:
Module not found: Can't resolve '../src/scss/main.css' in '/tmp/build_9673181c/pages
Here is my project directory
.github
-> workflows
-> main.yml
src
pages
-> app.ts (uses 'import "../src/scss/main.css"; in the file)
scss
-> main.scss
-> main.css (untracked in git & not pushed to remote repoistory, it is used locally
; github actions should compile the main.scss file and create a main.css file at CI build time)
package.json
The text was updated successfully, but these errors were encountered:
On first glance it seems the source and destination YAML configs have an unneeded ./ prefix on the target paths. Which may be why the ENOENT warning is popping...
Warning: ENOENT: no such file or directory, stat './src/scss/main.css'
Can ya please try removing the ./ prefix from source and destination YAML configs, and report if that does or does not fix things?
Example
jobs:
build:
runs-on: ubuntu-lateststeps:
- name: Checkout source Git branchuses: actions/checkout@v2with:
ref: mainfetch-depth: 10submodules: true
- name: Compile CSS from SCSS filesuses: gha-utilities/[email protected]with:
source: src/scss/main.scssdestination: src/scss/main.css#Deploys to Heroku
- uses: actions/checkout@v2
- uses: akhileshns/[email protected]# This is the actionwith:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}heroku_app_name: "gh-actions-heroku"#Must be unique in Herokuheroku_email: "[email protected]"
I don't think my .scss files are being compiled to .css at the CI build time.
Here is my main.yml:
Here is the github actions output that is working in step: Compile SCSS files to CSS:
This is the error in the next step (when trying to deploy it to Heroku). It looks like main.css is not created in src/scss at the CI build time since Heroku does not recognize the file?
Here is my project directory
The text was updated successfully, but these errors were encountered: