Skip to content

Commit

Permalink
📝
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory <[email protected]>
  • Loading branch information
tajemniktv committed Nov 8, 2024
1 parent b0bb3b2 commit 1d53b49
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 1d53b49

Please sign in to comment.