Skip to content

Commit 80a743b

Browse files
Copilotlippytm
andcommitted
Address code review feedback: add comments and simplify deploy logic
Co-authored-by: lippytm <65956507+lippytm@users.noreply.github.com>
1 parent 89ae9fc commit 80a743b

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,23 @@ jobs:
9191
# S3_BUCKET: ${{ vars.S3_BUCKET }}
9292
echo "Environment variables configured"
9393
94+
- name: Determine package manager
95+
id: package-manager
96+
run: |
97+
if [ -f "yarn.lock" ]; then
98+
echo "manager=yarn" >> $GITHUB_OUTPUT
99+
elif [ -f "package-lock.json" ]; then
100+
echo "manager=npm" >> $GITHUB_OUTPUT
101+
else
102+
echo "manager=" >> $GITHUB_OUTPUT
103+
fi
104+
94105
- name: Setup Node.js
106+
if: steps.package-manager.outputs.manager != ''
95107
uses: actions/setup-node@v4
96108
with:
97109
node-version: '20'
98-
cache: ${{ hashFiles('yarn.lock') != '' && 'yarn' || (hashFiles('package-lock.json') != '' && 'npm' || '') }}
110+
cache: ${{ steps.package-manager.outputs.manager }}
99111

100112
- name: Install dependencies
101113
run: |
@@ -141,17 +153,3 @@ jobs:
141153
# - Discord webhook: similar to Slack
142154
# - Email notification
143155
# - etc.
144-
145-
# Separate job for each environment when triggered by push
146-
deploy-on-push:
147-
if: github.event_name == 'push'
148-
runs-on: ubuntu-latest
149-
environment: dev
150-
steps:
151-
- name: Checkout code
152-
uses: actions/checkout@v4
153-
154-
- name: Deploy to dev environment
155-
run: |
156-
echo "Auto-deploying to dev on push to ${{ github.ref_name }}"
157-
echo "Add your deployment logic here"

.github/workflows/lint-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ jobs:
112112
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
113113
114114
- name: Check formatting with black
115+
# Note: continue-on-error allows the workflow to pass even with formatting issues
116+
# Remove this flag to enforce strict formatting standards
115117
run: |
116118
black --check .
117119
continue-on-error: true

0 commit comments

Comments
 (0)