Skip to content

Summary

Summary #1269

Workflow file for this run

name: Summary
on:
push:
branches:
- main
pull_request:
branches:
- main
# Run daily at 0:01 UTC
schedule:
- cron: '1 0 * * *'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --quiet install --requirement requirements.txt
python -m pip list
- name: Perform query of repositories
run: |
python query.py \
${{ secrets.ACCESS_TOKEN }} \
--query-list projects.json
- name: Generate summary table
run: |
python summary.py
- name: Update time series of summaries
run: |
python time_series.py \
https://raw.githubusercontent.com/iris-hep/analysis-community-summary/time-series/summary-time-series.csv \
--join-csv summary.csv \
--out-csv summary-time-series.csv
- name: Generate time series plots
run: |
python plots.py
ls -lhtra img/
- name: Setup files to deploy
id: prepare
shell: bash
run: |
cat summary.md >> README.md
printf "\n" >> README.md
cat time_series.md >> README.md
mkdir deploy
cp README.md deploy/
cp repo_data.json deploy/
cp summary.csv deploy/
cp summary.md deploy/
cp -r img deploy/
ls -lhtra deploy
mkdir time-series
cp summary.csv time-series/
cp summary-time-series.csv time-series/
ls -lhtra time-series
echo "::set-output name=datetime::$(date --utc '+%Y-%m-%d %H:%M %Z')"
- name: Deploy summary to GitHub Pages
if: success() && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: deploy
enable_jekyll: true # for README render
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: Deploy to GitHub pages
- name: Deploy time series
if: success() && github.event_name == 'schedule' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: time-series
publish_dir: time-series
enable_jekyll: true # avoid extra files
force_orphan: false # get commit history
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: Deploy time series summary ${{ steps.prepare.outputs.datetime }}