mirror of
https://github.com/spark-store-project/spark-store-abyss
synced 2025-12-17 12:51:38 +08:00
fix: Update nuxtjs.yml
This commit is contained in:
23
.github/workflows/nuxtjs.yml
vendored
23
.github/workflows/nuxtjs.yml
vendored
@@ -31,26 +31,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 }}
|
||||
node-version: "22"
|
||||
cache: pnpm
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
with:
|
||||
@@ -69,9 +54,9 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuxt-build-
|
||||
- name: Install dependencies
|
||||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
|
||||
run: pnpm install
|
||||
- name: Static HTML export with Nuxt
|
||||
run: ${{ steps.detect-package-manager.outputs.manager }} run generate
|
||||
run: pnpm generate
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user