-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (77 loc) · 2.25 KB
/
deploy-dashboard.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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