Skip to content

Commit 6052d5a

Browse files
committed
Update action
1 parent 5323620 commit 6052d5a

File tree

1 file changed

+8
-29
lines changed

1 file changed

+8
-29
lines changed

.github/workflows/nuxtjs.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,48 +29,27 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v3
33-
- name: Detect package manager
34-
id: detect-package-manager
35-
run: |
36-
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
37-
echo "manager=yarn" >> $GITHUB_OUTPUT
38-
echo "command=install" >> $GITHUB_OUTPUT
39-
exit 0
40-
elif [ -f "${{ github.workspace }}/package.json" ]; then
41-
echo "manager=npm" >> $GITHUB_OUTPUT
42-
echo "command=ci" >> $GITHUB_OUTPUT
43-
exit 0
44-
else
45-
echo "Unable to determine packager manager"
46-
exit 1
47-
fi
32+
uses: actions/checkout@v4
4833
- name: Setup Node
49-
uses: actions/setup-node@v3
34+
uses: actions/setup-node@v4
5035
with:
5136
node-version: "22"
52-
cache: ${{ steps.detect-package-manager.outputs.manager }}
37+
cache: npm
5338
- name: Setup Pages
54-
uses: actions/configure-pages@v2
55-
#with:
56-
# Automatically inject router.base in your Nuxt configuration file and set
57-
# target to static (https://nuxtjs.org/docs/configuration-glossary/configuration-target/).
58-
#
59-
# You may remove this line if you want to manage the configuration yourself.
60-
# static_site_generator: nuxt
39+
uses: actions/configure-pages@v5
6140
- name: Restore cache
62-
uses: actions/cache@v3
41+
uses: actions/cache@v4
6342
with:
6443
path: |
6544
.output
6645
.nuxt
67-
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
46+
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('package-lock.json') }}
6847
restore-keys: |
6948
${{ runner.os }}-nuxt-build-
7049
- name: Install dependencies
71-
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
50+
run: npm ci
7251
- name: Static HTML export with Nuxt
73-
run: ${{ steps.detect-package-manager.outputs.manager }} run generate
52+
run: npm run generate
7453
- name: Upload artifact
7554
uses: actions/upload-pages-artifact@v4
7655
with:

0 commit comments

Comments
 (0)