-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.6 KB
/
deploy.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
name: 'Automatic Build on Push'
on:
push:
branches:
- master
jobs:
continuous-delivery:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setting up Python Environment
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Submodule/Clone Init for Data
run: |
git clone --depth=1 https://github.com/nytimes/covid-19-data/
- name: Build Pages Json Data
run: |
python DataPreprocessing.py
- name: Get Current Time
id: currenttime
run: echo "::set-output name=now::$(date +'%Y/%m/%d-%H:%M:%S-UTC' --utc)"
- name: Add CNAME
run: echo "wear-a-mask.jasonchen.icu" > pages/CNAME
- name: Generate Sitemap for search engine
id: sitemap
uses: cicirello/[email protected]
with:
base-url-path: https://wear-a-mask.jasonchen.icu/
path-to-root: pages
sitemap-format: xml
- name: Deploy to Pages
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SQUASH_HISTORY: true
SKIP_EMPTY_COMMIT: true
MESSAGE: ${{ steps.currenttime.outputs.now }}