diff --git a/.github/workflows/astro.yml b/.github/workflows/astro.yml index dd42980..9bd16a9 100644 --- a/.github/workflows/astro.yml +++ b/.github/workflows/astro.yml @@ -25,17 +25,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: List files for debugging - run: ls -la ${{ github.workspace }}/site + run: ls -la site - name: Detect package manager id: detect-package-manager run: | - if [ -f "${{ github.workspace }}/site/yarn.lock" ]; then + if [ -f "site/yarn.lock" ]; then echo "manager=yarn" >> $GITHUB_OUTPUT echo "command=install" >> $GITHUB_OUTPUT echo "runner=yarn" >> $GITHUB_OUTPUT echo "lockfile=site/yarn.lock" >> $GITHUB_OUTPUT exit 0 - elif [ -f "${{ github.workspace }}/site/package.json" ]; then + elif [ -f "site/package.json" ]; then echo "manager=npm" >> $GITHUB_OUTPUT echo "command=ci" >> $GITHUB_OUTPUT echo "runner=npx --no-install" >> $GITHUB_OUTPUT @@ -50,23 +50,23 @@ jobs: with: node-version: "20" cache: ${{ steps.detect-package-manager.outputs.manager }} - cache-dependency-path: ${{ github.workspace }}/site/${{ steps.detect-package-manager.outputs.lockfile }} + cache-dependency-path: site/${{ steps.detect-package-manager.outputs.lockfile }} - name: Setup Pages id: pages uses: actions/configure-pages@v5 - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - working-directory: ${{ github.workspace }}/site + working-directory: site - name: Build with Astro run: | ${{ steps.detect-package-manager.outputs.runner }} astro build \ --site "${{ steps.pages.outputs.origin }}" \ --base "${{ steps.pages.outputs.base_path }}" - working-directory: ${{ github.workspace }}/site + working-directory: site - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: ${{ github.workspace }}/site/dist + path: site/dist deploy: environment: