-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (52 loc) · 1.44 KB
/
ci.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
name: Continuous Integration
on:
schedule:
# Run every hour
- cron: 0 */1 * * *
push:
branches:
- main
workflow_dispatch:
inputs:
start_date:
description: 'Start date'
required: false
default: '2022-02-20T04:51:27.000Z'
end_date:
description: 'End date'
required: false
default: '2023-05-26T04:51:27.000Z'
jobs:
deploy:
name: Builds and Deploys to github pages
runs-on: ubuntu-latest
environment: "Production"
env:
DATABASE_ID: ${{ secrets.DATABASE_ID }}
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: yarn --frozen-lockfile
- name: Set Completed Date
run: yarn run start
update-old:
name: Setups Completed date for all records
if: github.event_name == 'workflow_dispatch' # Only run when triggered manually
runs-on: ubuntu-latest
environment: "Production"
env:
DATABASE_ID: ${{ secrets.DATABASE_ID }}
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }}
START_DATE: ${{ inputs.start_date }}
END_DATE: ${{ inputs.end_date }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: yarn --frozen-lockfile
- name: Set Completed Date for all records
run: yarn run complete-old