Skip to content

Commit

Permalink
Fix nextjs.yml
Browse files Browse the repository at this point in the history
Create test.txt

Create test.txt

Update nextjs.yml

Revert "Create nextjs.yml"

This reverts commit 2b8e593.

Reapply "Create nextjs.yml"

This reverts commit b116bdc.

Revert "Reapply "Create nextjs.yml""

This reverts commit 71b3ac9.
  • Loading branch information
cnnmon committed Jun 25, 2024
1 parent 60d6af1 commit b5a466a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Detect package manager
id: detect-package-manager
run: |
Expand All @@ -48,19 +49,16 @@ jobs:
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "lts/*"
cache: ${{ steps.detect-package-manager.outputs.manager }}

- name: Setup Pages
uses: actions/configure-pages@v5
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
uses: actions/configure-pages@v4

- name: Restore cache
uses: actions/cache@v4
with:
Expand All @@ -71,12 +69,13 @@ jobs:
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}

- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Ensure out directory exists
run: mkdir -p ./out

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand All @@ -92,4 +91,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ module.exports = {
images: {
domains: ['https://github.com', 'https://githubusercontent.com/' ],
},
basePath: "/tiffanywang",
output: "export",
}

0 comments on commit b5a466a

Please sign in to comment.