File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments