Skip to content

Commit

Permalink
add scheduled update script
Browse files Browse the repository at this point in the history
  • Loading branch information
taisukef committed Jan 1, 2024
1 parent 3dbb0e6 commit bc6f26b
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/scheduled-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Scheduled update

on:
workflow_dispatch:
schedule:
# 10分間隔で実行
- cron: '*/10 * * * *'

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: make
run: |
deno run -A download.js
- name: commit and push
run: |
git config --global user.email "[email protected]"
git config --global user.name "workflow user"
git add .
git commit -m 'update data' && git push ${REPO} HEAD:${{github.event.pull_request.head.ref}} || true
git push
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# tidelevel


https://code4fukui.github.io/tidelevel/

## auto update

```sh
mkdir .github; mkdir .github/workflows
```

edit scheduled-update.yml
```sh
cat > .github/workflows/scheduled-update.yml
```

```
name: Scheduled update
on:
workflow_dispatch:
schedule:
# 10分間隔で実行
- cron: '*/10 * * * *'
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: make
run: |
deno run -A download.js
- name: commit and push
run: |
git config --global user.email "[email protected]"
git config --global user.name "workflow user"
git add .
git commit -m 'update data' && git push ${REPO} HEAD:${{github.event.pull_request.head.ref}} || true
git push
```

0 comments on commit bc6f26b

Please sign in to comment.