Node.js App Workflow #9
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
name: Node.js App Workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MYSQL_HOST: ${{ vars.MYSQL_HOST }} | |
MYSQL_USER: ${{ vars.MYSQL_USER }} | |
MYSQL_PASSWORD: ${{vars.MYSQL_PASSWORD }} | |
MYSQL_DATABASE: ${{vars.MYSQL_DATABASE }} | |
MYSQL_PORT: ${{vars.MYSQL_PORT }} | |
START: ${{vars.START }} | |
END: ${{vars.END }} | |
IS_SPLIDER: ${{vars.IS_SPLIDER }} | |
API_KEY: ${{vars.API_KEY }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Install Dependencies | |
run: npm install | |
- name: Run Node.js App | |
run: npm run start | |
- name: Commit and Push Changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "ivwv GitHub Action" | |
git add . | |
git commit -m "Auto-commit from GitHub Action" | |
git push |