This repository was archived by the owner on Sep 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (56 loc) · 1.77 KB
/
update-data.yml
File metadata and controls
68 lines (56 loc) · 1.77 KB
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
name: nightly
on:
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup miniconda environment
uses: conda-incubator/setup-miniconda@master
with:
channels: conda-forge,nodefaults
channel-priority: strict
activate-environment: xdev
auto-update-conda: false
python-version: 3.9
environment-file: environment.yml
mamba-version: '*'
use-mamba: true
- name: Verify environment installation
run: conda env list
- id: 'auth'
name: Authenticate for Google BigQuery access
uses: google-github-actions/auth@v0
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Update package download data
run: ./cli/getdownloads.py
- name: Update GitHub statistics
run: ./cli/getghstats.py
env:
GITHUB_TOKEN: '${{ secrets.GRAPHQL_TOKEN }}'
- name: Use pre-commit to fix newly generated data
run: |
conda install pre-commit
pre-commit install
pre-commit run --all || pre-commit run --all
- name: Commit new changes
uses: EndBug/add-and-commit@v8
with:
add: '-A'
default_author: github_actions
message: '[skip ci] Nightly metrics updates'
- name: Build the book
run: jupyter-book build .
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
enable_jekyll: false