Skip to content

Fix some minor issues #8

Fix some minor issues

Fix some minor issues #8

Workflow file for this run

name: Run and Deploy
on:
push:
branches:
- 'main'
pull_request:
# Allow manual runs through the web UI
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_style:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install tox
- name: Check Style
run: |
tox -e codestyle
run_script:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo apt install pandoc
python -m pip install tox
- name: Run Script
run: |
tox -e py311
- name: Run notebook and create html index
run: |
tox -e notebook
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: files
path: |
timeline*
index.html
deploy:
needs: [run_script]
# if: |
# (
# github.event_name != 'pull_request' && (
# github.ref_name != 'main' ||
# github.event_name == 'workflow_dispatch'
# )
# )
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
with:
name: files
path: files
- name: Upload files to release
uses: svenstaro/upload-release-action@v2
with:
tag: ${{ steps.date.outputs.date }}
file: files/timeline*
overwrite: true
body: "Latest version of the timeline"
- name: Push index.html to branch page
if: ${{ github.ref }} == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./files