From afbaaf90d155a637fa3299a92ca1a685d59cba00 Mon Sep 17 00:00:00 2001 From: Yo'av Moshe Date: Sun, 29 Sep 2024 12:27:38 +0200 Subject: [PATCH] Update nuxtjs.yml --- .github/workflows/nuxtjs.yml | 50 +++++------------------------------- 1 file changed, 7 insertions(+), 43 deletions(-) diff --git a/.github/workflows/nuxtjs.yml b/.github/workflows/nuxtjs.yml index 5d29ac1..5cb4725 100644 --- a/.github/workflows/nuxtjs.yml +++ b/.github/workflows/nuxtjs.yml @@ -27,57 +27,21 @@ concurrency: cancel-in-progress: false jobs: - # Build job build: runs-on: ubuntu-latest 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 + - uses: actions/checkout@v3 + - run: corepack enable + - uses: actions/setup-node@v3 with: node-version: "20" - cache: ${{ steps.detect-package-manager.outputs.manager }} - - name: Setup Pages - uses: actions/configure-pages@v5 - with: - # Automatically inject router.base in your Nuxt configuration file and set - # target to static (https://nuxtjs.org/docs/configuration-glossary/configuration-target/). - # - # You may remove this line if you want to manage the configuration yourself. - static_site_generator: nuxt - - name: Restore cache - uses: actions/cache@v4 - with: - path: | - dist - .nuxt - 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 build --preset github_pages + # Pick your own package manager and build script + - run: npm install + - run: npx nuxt build --preset github_pages - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: .output/public + path: ./.output/public # Deployment job deploy: