From d65efae8d8a221e2353d868ef5adcc3418cf2f5a Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Sat, 15 Mar 2025 22:55:19 +0100 Subject: [PATCH] updated workflow --- .gitea/workflows/workflow.yaml | 30 ++++++++++++++++++++++++++++-- package.json | 22 +++++++++++----------- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/workflow.yaml b/.gitea/workflows/workflow.yaml index 384b8a0..03599e7 100644 --- a/.gitea/workflows/workflow.yaml +++ b/.gitea/workflows/workflow.yaml @@ -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 \ No newline at end of file + 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/ \ No newline at end of file diff --git a/package.json b/package.json index fb34d17..8327aa6 100644 --- a/package.json +++ b/package.json @@ -4,16 +4,16 @@ "version": "1.0.0", "author": "Hunter Chang", "dependencies": { - "gatsby": "^2.20.12", - "gatsby-plugin-manifest": "^2.3.3", - "gatsby-plugin-offline": "^3.1.2", - "gatsby-plugin-react-helmet": "^3.2.1", - "gatsby-plugin-sass": "^2.2.1", - "node-sass": "^4.13.1", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "react-helmet": "^5.2.1", - "react-images": "^1.0.0" + "gatsby": "^5.12.12", + "gatsby-plugin-manifest": "^5.12.3", + "gatsby-plugin-offline": "^6.12.3", + "gatsby-plugin-react-helmet": "^6.12.0", + "gatsby-plugin-sass": "^6.12.3", + "sass": "^1.69.5", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-helmet": "^6.1.0", + "react-images": "^1.2.0-beta.7" }, "keywords": [ "gatsby" @@ -26,7 +26,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "devDependencies": { - "prettier": "^2.0.2" + "prettier": "^3.1.0" }, "repository": { "type": "git",