-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (34 loc) · 1.02 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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