Skip to content

Commit

Permalink
Remove main.yml and unnecessary steps from gatsby.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
katbow committed Sep 25, 2024
1 parent fcebf1d commit df0eadb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 72 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/gatsby.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Sample workflow for building and deploying a Gatsby site to GitHub Pages
#
# To get started with Gatsby see: https://www.gatsbyjs.com/docs/quick-start/
#
name: Deploy Gatsby site to Pages

on:
Expand Down Expand Up @@ -36,26 +32,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
cache: npm
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
Expand All @@ -74,11 +55,11 @@ jobs:
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
run: npm ci
- name: Build with Gatsby
env:
PREFIX_PATHS: 'true'
run: ${{ steps.detect-package-manager.outputs.manager }} run build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/main.yml

This file was deleted.

0 comments on commit df0eadb

Please sign in to comment.