Update nuxtjs.yml
This commit is contained in:
parent
8350d2ad35
commit
e202260205
1 changed files with 8 additions and 23 deletions
31
.github/workflows/nuxtjs.yml
vendored
31
.github/workflows/nuxtjs.yml
vendored
|
@ -31,26 +31,10 @@ 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
|
||||
- name: Setup Deno
|
||||
uses: denoland/setup-deno@v2
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
||||
deno-version: v2.x
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
with:
|
||||
|
@ -68,14 +52,15 @@ jobs:
|
|||
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuxt-build-
|
||||
|
||||
- name: Install dependencies
|
||||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
|
||||
- name: Static HTML export with Nuxt
|
||||
run: ${{ steps.detect-package-manager.outputs.manager }} run generate
|
||||
run: deno install
|
||||
- name: Generate project as a static site
|
||||
run: deno task generate
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./dist
|
||||
path: .output/public
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
|
|
Loading…
Add table
Reference in a new issue