-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (64 loc) · 1.96 KB
/
tistory.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: tistory # 워크플로우 이름 지정
on:
schedule:
- cron: "0 0 */1 * *"
workflow_dispatch:
inputs:
name:
description: "Person to greet"
required: true
default: "bossm0n5t3r"
home:
description: "location"
required: false
default: "The Octoverse"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PYPI_API_TOKEN }}
persist-credentials: false
fetch-depth: 0
# 한국 시간으로 변경
- name: Set Timezone to +9 (GMT+9)
uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Asia/Seoul"
- name: Set up Python 3.x
uses: actions/setup-python@v1
with:
python-version: '3.x'
architecture: 'x64'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pip install -r requirements.txt
pip install requests
pip install lxml
pip install datetime
pip install feedparser
pip install webdriver_manager
- name: Install ubuntu package # 우분투 관련 패키지도 설치
run: |
sudo apt-get install fonts-unfonts-core
sudo apt-get install fonts-unfonts-extra
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add
- name: Run Scraper with python
run: |
python parser.py
- name: Set date in environment variable
run: echo "DATE=$(date +'%Y년 %m월 %d일 %H시 %M분')" >> $GITHUB_ENV
- name: Add & Commit # Add Commit
uses: EndBug/add-and-commit@v7
with:
message: '블로그 자동 업데이트 : ${{ env.DATE }}'
author_name: 'GitHub-Actions-Bot'
add: '.'
push: false
- name: Push
uses: ad-m/github-push-action@master
with:
branch: 'main'
github_token: ${{ secrets.PYPI_API_TOKEN }}