Skip to content

Node.js CI

Node.js CI #13313

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "30 * * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Use Node.js lts/Hydrogen
uses: actions/setup-node@v3
with:
node-version: lts/Hydrogen
cache: "npm"
- name: Install dependencies
run: npm ci
- name: run main
run: npm run main
- name: commit
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add .
git pull
git commit -m "update by github action"
git push