Skip to content

Commit

Permalink
fix: pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mildronize committed Jan 23, 2024
1 parent 92362c9 commit 35b05b9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,25 @@ 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
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- uses: actions/setup-node@v3
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
cache-dependency-path: ${{ env.BUILD_PATH }}/package-lock.json
cache: "pnpm"

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
run: pnpm install
working-directory: ${{ env.BUILD_PATH }}
- name: Build with Astro
run: |
${{ steps.detect-package-manager.outputs.runner }} astro build \
pnpm build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: ${{ env.BUILD_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "20"
cache: "pnpm"

- run: pnpm install
Expand Down

0 comments on commit 35b05b9

Please sign in to comment.