Skip to content

Commit

Permalink
Revert "attempt to fix 2.4.2 (#64)" (#65)
Browse files Browse the repository at this point in the history
This reverts commit 5e26ae0.
  • Loading branch information
lucascantor authored Apr 5, 2024
1 parent 5e26ae0 commit 3e119ee
Showing 1 changed file with 12 additions and 34 deletions.
46 changes: 12 additions & 34 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Eleventy site to GitHub Pages
name: Build Eleventy site and deploy it to GitHub Pages

on:
# Runs on pushes targeting the master branch
Expand All @@ -24,44 +24,22 @@ jobs:
build:
runs-on: ubuntu-latest
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 packager manager"
exit 1
fi
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '16'
cache: ${{ steps.detect-package-manager.outputs.manager }}
node-version: 'node'
check-latest: true

- name: Setup Pages
uses: actions/configure-pages@v5
- name: Restore cache
uses: actions/cache@v4
with:
path: |
.eleventy/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-eleventy-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-eleventy-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build
run: ${{ steps.detect-package-manager.outputs.manager }} run build

- name: Install dependencies & build
run: |
npm install
npm run build-gh-pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down

0 comments on commit 3e119ee

Please sign in to comment.