Skip to content

ci

ci #756

Workflow file for this run

name: ci
# Author: @MikeRalphson
# Issue : n/a
# Desc : This workflow runs a simple CI flow for a node.js project
# run this on push to any branch and creation of pull-requests
on:
schedule:
- cron: '0 18 * * *'
workflow_dispatch: {}
jobs:
ci:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NITRO_KEY: ${{ secrets.NITRO_KEY }}
steps:
- uses: actions/checkout@v2 # checkout repo content
with:
fetch-depth: 0
ref: main
- uses: actions/setup-node@v2 # setup Node.js
with:
node-version: '18.x'
- name: Install deps
run: npm i
- name: update APIs
run: ./update.sh ${NITRO_KEY}
- name: 🚀 Deploy
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git diff-index --quiet HEAD || git commit -am "Auto-update APIs"
git push --all -f https://Mermade:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git