-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 01d143a
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Update Dependencies | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' # You can change the Node.js version as needed | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm init -y # Use npm ci for a clean install based on package-lock.json | ||
- name: Remove pagedone package | ||
run: | | ||
npm install express body-parser mysql2 | ||
- name: Commit changes | ||
run: | | ||
git config --local user.name "github-actions" | ||
git config --local user.email "[email protected]" | ||
git add package.json package-lock.json | ||
git diff --cached --quiet || git commit -m "chore: update dependencies" # Commit only if there are changes | ||
git push origin main # Specify the remote and branch to push to | ||
- name: Run tests | ||
run: | | ||
npm test # Run tests if you have a test script |