Move Node.js install before checkout in Linux build
The Gitea Linux runner also lacks Node.js, causing actions/checkout@v4 (a JS action) to fail with "node: executable file not found in PATH". Same fix as the macOS job: install Node.js via shell before any JS-based actions run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,9 +19,19 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
PATH: /home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install Node.js
|
||||||
|
run: |
|
||||||
|
if command -v node >/dev/null 2>&1; then
|
||||||
|
echo "Node.js already installed: $(node --version)"
|
||||||
|
else
|
||||||
|
echo "Installing Node.js 22..."
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
||||||
|
sudo apt-get install -y nodejs
|
||||||
|
fi
|
||||||
|
node --version
|
||||||
|
npm --version
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -75,18 +85,6 @@ jobs:
|
|||||||
rustc --version
|
rustc --version
|
||||||
cargo --version
|
cargo --version
|
||||||
|
|
||||||
- name: Install Node.js
|
|
||||||
run: |
|
|
||||||
if command -v node >/dev/null 2>&1; then
|
|
||||||
echo "Node.js already installed: $(node --version)"
|
|
||||||
else
|
|
||||||
echo "Installing Node.js 22..."
|
|
||||||
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
|
||||||
sudo apt-get install -y nodejs
|
|
||||||
fi
|
|
||||||
node --version
|
|
||||||
npm --version
|
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
working-directory: ./app
|
working-directory: ./app
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|||||||
Reference in New Issue
Block a user