-
Notifications
You must be signed in to change notification settings - Fork 47
42 lines (35 loc) · 1.04 KB
/
update-api.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
38
39
40
41
42
name: deploy api
on:
# schedule once a day at 8 pm
schedule:
- cron: '0 16 * * *'
# manual
workflow_dispatch:
jobs:
api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
# choose node.js version to use
node-version: '20'
# install dependencies if the cache did not hit
- name: Install dependencies
run: npm install
- name: Update needle engine api
run: npm run docs:build-api
env:
API_FTP_USER: ${{ secrets.API_FTP_USER }}
API_FTP_PASSWORD: ${{ secrets.API_FTP_PASSWORD }}
API_FTP_HOST: ${{ secrets.API_FTP_HOST }}
notify_discord:
needs: api
runs-on: ubuntu-latest
steps:
- uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DEPLOY_DISCORD_WEBHOOK }}
username: "Update Api 🤖"
content: "API has been updated → <https://engine.needle.tools/docs/api>"