Skip to content

Deploy-Dashboard

Deploy-Dashboard #1340

name: Deploy-Dashboard
on:
push:
branches: ["main"]
schedule:
- cron: 0 0,8,16 * * *
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-deploy-site:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-20.04
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup env
uses: ./.github/actions/common/setup-env
with:
free_up_space: false
- name: Initalize gcc
id: init
run: |
cd riscv-gnu-toolchain
git submodule update --init gcc
cd gcc
git fetch
continue-on-error: true
- name: Initalize gcc
if: ${{ steps.init.outcome == 'failure' }}
run: |
echo "Failed to initialize gcc. Retrying in 1 min"
sleep 60
cd riscv-gnu-toolchain
git submodule update --init gcc
cd gcc
git fetch
- name: Bump pyopenssl and crypto
run: |
sudo apt remove python3-pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
pip install -U pyopenssl cryptography
- name: Get new data
run: |
pip install pygithub requests
cd dashboard
python getdata.py -token ${{ secrets.GITHUB_TOKEN }}
- name: Build site
run: |
pip install pandas plotly
cd dashboard
python plot.py
- name: Commit new data/site
uses: EndBug/add-and-commit@v9
with:
message: 'CI: Update dashboard with latest runs'
add: 'dashboard'
# Deploy
- name: Configure Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dashboard/site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4