I have failed to deploy my source code to the web using GitHub's CI/CD. My product still runs well on a MacBook or Windows machine with the same versions of Node, npm, and yarn, but it encounters an error on GitHub. Here are the workflow details of my file.
name: Build develop
'on':
push:
branches:
- develop
workflow_dispatch: null
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.12.0
- name: cp env
run: cp ./.env.develop ./.env
- name: Build product
run: |
yarn cache clean
yarn install
yarn build
- name: list folder
run: ls -l
- name: install ssh keys
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: scp folder to server
run: "scp -r ./build/* root@${{ secrets.SSH_HOST }}:/var/www/test/develop/test-fe"
and error:
Warning
(1:5113) autoprefixer: end value has mixed support, consider using flex-end instead
Warning
(1:60257) autoprefixer: end value has mixed support, consider using flex-end instead
static/css/main.0bc37bf3.css from Css Minimizer plugin
postcss-calc:: Lexical error on line 1: Unrecognized text.
Erroneous area:
1: auto + var(--pc-choice-space-0) + var(--pc-choice-space-0)
^..^ webpack://./node_modules/@shopify/polaris/build/esm/styles.css:1684:2591
static/css/main.0bc37bf3.css from Css Minimizer plugin
postcss-calc:: Lexical error on line 1: Unrecognized text.
Erroneous area:
1: auto + var(--pc-choice-space-0) + var(--pc-choice-space-0)
^..^ webpack://./node_modules/@shopify/polaris/build/esm/styles.css:1684:2765
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
I have tested it on both MacBook and Windows, and it was successful. I hope to be able to run it on GitHub CI/CD.