This commit is contained in:
@@ -17,9 +17,35 @@ jobs:
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
- name: Build Gatsby Site
|
||||
run: npm build
|
||||
run: |
|
||||
npm run build
|
||||
env:
|
||||
NODE_ENV: production
|
||||
CI: true
|
||||
|
||||
- name: Check build output
|
||||
run: |
|
||||
if [ ! -d "public" ]; then
|
||||
echo "Build failed - public directory not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: gatsby-build
|
||||
path: public/
|
||||
Reference in New Issue
Block a user