Skip to content

Commit

Permalink
fix: pnpm lockfile location for astro
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>
  • Loading branch information
fgmadeira committed May 15, 2024
1 parent f07884b commit 0e9b8dc
Show file tree
Hide file tree
Showing 7 changed files with 10,051 additions and 12,173 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,29 @@ jobs:
- 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
echo "manager=pnpm" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=pnpm run" >> $GITHUB_OUTPUT
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
cache-dependency-path: ${{ env.BUILD_PATH }}/package-lock.json
node-version: 20
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dashboard-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
run: |
echo "${{ secrets.AZURE_BLOB_STORAGE_ACCOUNT }}" >> ./web/dashboard/.env
echo "${{ secrets.AZURE_BLOB_STORAGE_SECRET }}" >> ./web/dashboard/.env
echo "${{ secrets.NEXT_AUTH_SECRET }}" >> ./web/dashboard/.env
echo "DRIZZLE_DATABASE_TYPE=neon" >> ./web/dashboard/.env
echo "DRIZZLE_DATABASE_URL=${{ steps.create-branch.outputs.db_url }}?sslmode=require" >> ./web/dashboard/.env
echo "${{ secrets.NEXT_AUTH_SECRET }}" >> ./web/dashboard/.env
cd ./web/dashboard
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/dashboard-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
echo "${{ secrets.PGUSER }}" >> ./web/dashboard/.env
echo "${{ secrets.PGPORT }}" >> ./web/dashboard/.env
echo "${{ secrets.PGPASSWORD }}" >> ./web/dashboard/.env
echo "PGSSL=true" >> ./web/dashboard/.env
echo "${{ secrets.NEXT_AUTH_SECRET }}" >> ./web/dashboard/.env
echo "PGSSL=true" >> ./web/dashboard/.env
- name: Build and push Docker image
uses: docker/build-push-action@v2
Expand All @@ -47,8 +47,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
#- uses: actions-hub/kubectl@master
# env:
# KUBE_CONFIG: ${{ secrets.KUBECONFIG_TOKEN }}
# with:
# args: get pods
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
[ main ]
paths:
- 'web/dashboard/**'
- '.github/workflows/demo-ethereal-nexus-AutoDeployTrigger-b5b2e196-b8c8-4d42-8528-b07617ea6295.yml'
- '.github/workflows/demo-ethereal-nexus-deploy.yml'

# Allow manual trigger
workflow_dispatch:
Expand Down Expand Up @@ -40,16 +40,16 @@ jobs:

- name: 'Create env file'
run: |
echo "${{ secrets.MONGODB_URI }}" >> ./ethereal-nexus-dashboard/.env
echo "${{ secrets.AZURE_BLOB_STORAGE_ACCOUNT }}" >> ./ethereal-nexus-dashboard/.env
echo "${{ secrets.AZURE_BLOB_STORAGE_SECRET }}" >> ./ethereal-nexus-dashboard/.env
echo "${{ secrets.PGHOST }}" >> ./ethereal-nexus-dashboard/.env
echo "${{ secrets.PGUSER }}" >> ./ethereal-nexus-dashboard/.env
echo "${{ secrets.PGPORT }}" >> ./ethereal-nexus-dashboard/.env
echo "${{ secrets.PGPASSWORD }}" >> ./ethereal-nexus-dashboard/.env
echo "PGSSL=true" >> ./ethereal-nexus-dashboard/.env
echo "${{ secrets.NEXT_AUTH_SECRET }}" >> ./ethereal-nexus-dashboard/.env
echo "${{ secrets.MONGODB_URI }}" >> ./web/dashboard/.env
echo "${{ secrets.AZURE_BLOB_STORAGE_ACCOUNT }}" >> ./web/dashboard/.env
echo "${{ secrets.AZURE_BLOB_STORAGE_SECRET }}" >> ./web/dashboard/.env
echo "${{ secrets.PGHOST }}" >> ./web/dashboard/.env
echo "${{ secrets.PGUSER }}" >> ./web/dashboard/.env
echo "${{ secrets.PGPORT }}" >> ./web/dashboard/.env
echo "${{ secrets.PGPASSWORD }}" >> ./web/dashboard/.env
echo "${{ secrets.NEXT_AUTH_SECRET }}" >> ./web/dashboard/.env
echo "PGSSL=true" >> ./web/dashboard/.env
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
Expand Down
Loading

0 comments on commit 0e9b8dc

Please sign in to comment.