-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.25 KB
/
gh-pages-scheduled.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
name: updata data scheduled
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 7 * * *'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: node getCruxData.mjs
env:
PSIKUS: ${{ secrets.PSIKUS }}
- run: node createOrUpdateDataChart.mjs
- run: npm run build
- run: touch dist/.nojekyll
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: crux-data-${{ steps.date.outputs.date }}
branch: 'master'
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: crux.gotomi.info