make_plots #103
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: make_plots | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
# Runs every week | |
- cron: "0 0 */7 * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- uses: actions/cache@v2 | |
name: Configure pip caching | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Execute notebook | |
run: jupyter nbconvert --to 'html' --execute transcriptomics_studies_over_time.ipynb | |
- name: Commit and push new data | |
run: |- | |
git config user.name "Plot from CI" | |
git config user.email "" | |
git status | |
git add plots/* | |
timestamp=$(date -u) | |
git commit -m "Latest data: ${timestamp}" || exit 0 | |
git push | |
- name: Clean up | |
run: | | |
rm transcriptomics_studies_over_time.html |