updated workflow
Some checks failed
My Gatsby Deployment pipeline / build (push) Failing after 38s

This commit is contained in:
2025-03-15 22:55:19 +01:00
parent b8affa0dc5
commit d65efae8d8
2 changed files with 39 additions and 13 deletions

View File

@@ -17,9 +17,35 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18 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 - name: Install Dependencies
run: npm install run: npm ci
- name: Build Gatsby Site - 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/

View File

@@ -4,16 +4,16 @@
"version": "1.0.0", "version": "1.0.0",
"author": "Hunter Chang", "author": "Hunter Chang",
"dependencies": { "dependencies": {
"gatsby": "^2.20.12", "gatsby": "^5.12.12",
"gatsby-plugin-manifest": "^2.3.3", "gatsby-plugin-manifest": "^5.12.3",
"gatsby-plugin-offline": "^3.1.2", "gatsby-plugin-offline": "^6.12.3",
"gatsby-plugin-react-helmet": "^3.2.1", "gatsby-plugin-react-helmet": "^6.12.0",
"gatsby-plugin-sass": "^2.2.1", "gatsby-plugin-sass": "^6.12.3",
"node-sass": "^4.13.1", "sass": "^1.69.5",
"react": "^16.13.1", "react": "^18.2.0",
"react-dom": "^16.13.1", "react-dom": "^18.2.0",
"react-helmet": "^5.2.1", "react-helmet": "^6.1.0",
"react-images": "^1.0.0" "react-images": "^1.2.0-beta.7"
}, },
"keywords": [ "keywords": [
"gatsby" "gatsby"
@@ -26,7 +26,7 @@
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"devDependencies": { "devDependencies": {
"prettier": "^2.0.2" "prettier": "^3.1.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",