Automatic Build on Schedule #1330
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: 'Automatic Build on Schedule' | |
on: | |
schedule: | |
- cron: '0 8 * * *' | |
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: 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: 'Schedule Update' |