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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Detect package manager
|
- name: Setup Deno
|
||||||
id: detect-package-manager
|
uses: denoland/setup-deno@v2
|
||||||
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:
|
with:
|
||||||
node-version: "20"
|
deno-version: v2.x
|
||||||
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v5
|
uses: actions/configure-pages@v5
|
||||||
with:
|
with:
|
||||||
|
@ -68,14 +52,15 @@ jobs:
|
||||||
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
|
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-nuxt-build-
|
${{ runner.os }}-nuxt-build-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
|
run: deno install
|
||||||
- name: Static HTML export with Nuxt
|
- name: Generate project as a static site
|
||||||
run: ${{ steps.detect-package-manager.outputs.manager }} run generate
|
run: deno task generate
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: ./dist
|
path: .output/public
|
||||||
|
|
||||||
# Deployment job
|
# Deployment job
|
||||||
deploy:
|
deploy:
|
||||||
|
|
Loading…
Add table
Reference in a new issue