crawling #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: crawling | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '10 0 * * *' # GMT 기준 0시 10분. (한국 시각 9시 10분.) | |
env: | |
TZ: Asia/Seoul | |
BUILD_CONFIGURATION: Release | |
jobs: | |
build: | |
strategy: | |
fail-fast: true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' # submodule 받아오지 않으면 stylecop이 제대로 동작하지 않는다. | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c ${{env.BUILD_CONFIGURATION}} --no-restore | |
- name: Publish | |
run: dotnet publish ./GameRank.Crawler/GameRank.Crawler.csproj -c ${{env.BUILD_CONFIGURATION}} -o bin/publish --no-build --no-restore | |
- name: Crawling | |
run: ./bin/publish/GameRank.Crawler config.github.json | |
- name: Commit | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Update GameRank" | |
git push |