-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1023 Bytes
/
update.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
name: Update APIs
permissions:
contents: write
pages: write
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run fetcher script
run: deno run --allow-net --allow-read --allow-write fetcher.ts
- name: Format README.md
run: deno fmt README.md
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m ":card_file_box: Update APIs: $(date +'%Y-%m-%d')" || exit 0
git push
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
force_orphan: true