-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.11 KB
/
scrape.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
name: Scrape action
on:
workflow_dispatch:
schedule:
- cron: '0 15 * * *' # 毎日日本時間の0時に更新
jobs:
scrape:
name: ruby
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- name: bundle install
run: |
gem install bundler:2.1.4
bundle install
working-directory: ${{ github.workspace }}/Scraper
- name: run ruby
run: ruby scrape.rb
working-directory: ${{ github.workspace }}/Scraper
- name: copy file
run: cp result.json ../Viewer/resource
working-directory: ${{ github.workspace }}/Scraper
- name: git setting
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Commit files
run: |
git add -A
if ! git diff-index --quiet HEAD --; then git commit -a -m "Update json (By GitHub Actions)"; fi;
git push
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."