Skip to content

Commit a6fbc99

Browse files
committed
feat(workflow): Enhance deployment process by refining dependency installation
- Added cache-dependency-path for improved caching of yarn dependencies. - Separated installation steps for root and infrastructure dependencies to streamline the build process. - Ensured consistent installation of dependencies with frozen lockfile option for both directories. These changes optimize the GitHub Actions workflow for better performance and reliability during deployment.
1 parent 4de9631 commit a6fbc99

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/deploy.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
with:
3636
node-version: "20"
3737
cache: "yarn"
38+
cache-dependency-path: "**/yarn.lock"
3839

3940
- name: Configure AWS Credentials
4041
uses: aws-actions/configure-aws-credentials@v4
@@ -43,10 +44,16 @@ jobs:
4344
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4445
aws-region: ${{ env.AWS_REGION }}
4546

46-
# Install and build frontend
47-
- name: Install Dependencies
47+
# Install dependencies in the root directory
48+
- name: Install Root Dependencies
4849
run: yarn install --frozen-lockfile
4950

51+
# Install dependencies in the infrastructure directory
52+
- name: Install Infrastructure Dependencies
53+
working-directory: ./infrastructure
54+
run: yarn install --frozen-lockfile
55+
56+
# Build the Next.js app in the root directory
5057
- name: Build Next.js App
5158
env:
5259
NEXT_PUBLIC_BASE_URL: ${{ env.NEXT_PUBLIC_BASE_URL }}

0 commit comments

Comments
 (0)