mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 04:06:54 +00:00
Update nextjs.yml
This commit is contained in:
parent
6a1b80914c
commit
e8c7dea6c4
25
.github/workflows/nextjs.yml
vendored
25
.github/workflows/nextjs.yml
vendored
@ -18,8 +18,9 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Detect package manager
|
||||
id: detect-package-manager
|
||||
run: |
|
||||
@ -37,42 +38,45 @@ jobs:
|
||||
echo "Unable to determine package manager"
|
||||
exit 1
|
||||
fi
|
||||
- name: Setup Node
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
||||
cache-dependency-path: web/package-lock.json
|
||||
- name: Setup Pages
|
||||
|
||||
- name: Setup GitHub Pages
|
||||
uses: actions/configure-pages@v5
|
||||
with:
|
||||
static_site_generator: next
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
web/.next/cache
|
||||
path: web/.next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('web/package-lock.json') }}-${{ hashFiles('web/**.[jt]s', 'web/**.[jt]sx') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nextjs-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd web
|
||||
${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
|
||||
- name: Build with Next.js
|
||||
|
||||
- name: Build Next.js project
|
||||
run: |
|
||||
cd web
|
||||
${{ steps.detect-package-manager.outputs.runner }} next build
|
||||
- name: Static HTML export with Next.js
|
||||
run: |
|
||||
cd web
|
||||
${{ steps.detect-package-manager.outputs.runner }} next export
|
||||
|
||||
- name: Copy guides and changelog
|
||||
run: |
|
||||
mkdir -p web/out/guides
|
||||
cp guides/*.md web/out/guides/
|
||||
cp CHANGELOG.md web/out/
|
||||
- name: Upload artifact
|
||||
|
||||
- name: Upload artifact to GitHub Pages
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: web/out
|
||||
@ -87,4 +91,3 @@ jobs:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user