@@ -17,76 +17,76 @@ jobs:
17
17
website :
18
18
runs-on : ubuntu-latest
19
19
steps :
20
- - name : Clone website repository on current branch
21
- uses : actions/checkout@v4
22
- with :
23
- fetch-depth : 0
24
- - name : Clone website repository on stats branch
25
- uses : actions/checkout@v4
26
- with :
27
- ref : stats
28
- fetch-depth : 0
29
- path : _build/stats
30
- - name : Clone website repository on gh-pages branch
31
- uses : actions/checkout@v4
32
- with :
33
- ref : gh-pages
34
- fetch-depth : 0
35
- path : _build/html
36
- - name : Install dependencies
37
- run : |
38
- pip3 -q install pandas plotly sphinx-material
39
- - name : Generate sphinx website
40
- run : |
41
- pushd _stats
42
- ln -s ../_build/stats/stats.csv stats.csv
43
- popd
44
- rm -rf _build/html/* && make html
45
- - name : Fix permissions
46
- run : |
47
- sudo chown $USER _build -R
48
- - name : Check that no releases or notebooks have been deleted
49
- run : |
50
- pushd _build/html
51
- if [[ $(git ls-files --deleted releases | wc -l) -gt 0 ]]; then
52
- echo "The following releases have been deleted:"
53
- git ls-files --deleted releases
54
- exit 1
55
- fi
56
- if [[ $(git ls-files --deleted tests | wc -l) -gt 0 ]]; then
57
- echo "The following notebooks have been deleted:"
58
- git ls-files --deleted tests
59
- exit 1
60
- fi
61
- popd
62
- shell : bash
63
- - name : Deploy to GitHub pages
64
- if : github.repository == 'fem-on-kaggle/fem-on-kaggle.github.io' && github.ref == 'refs/heads/main'
65
- run : |
66
- SHA_SHORT=$(git rev-parse --short HEAD)
67
- pushd _build/html
68
- git config user.name "GitHub Actions"
69
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
70
- git add .
71
- git pull origin gh-pages
72
- [ -n "$(git status --porcelain=v1 2>/dev/null)" ] && git commit -m "deploy: ${SHA_SHORT}"
73
- git push origin gh-pages
74
- popd
75
- shell : bash
76
- - name : Deploy to GitHub artifacts
77
- if : github.repository == 'fem-on-kaggle/fem-on-kaggle.github.io' && github.ref != 'refs/heads/main'
78
- uses : actions/upload-artifact@v3
79
- with :
80
- name : website
81
- path : _build/html
82
- retention-days : 1
20
+ - name : Clone website repository on current branch
21
+ uses : actions/checkout@v4
22
+ with :
23
+ fetch-depth : 0
24
+ - name : Clone website repository on stats branch
25
+ uses : actions/checkout@v4
26
+ with :
27
+ ref : stats
28
+ fetch-depth : 0
29
+ path : _build/stats
30
+ - name : Clone website repository on gh-pages branch
31
+ uses : actions/checkout@v4
32
+ with :
33
+ ref : gh-pages
34
+ fetch-depth : 0
35
+ path : _build/html
36
+ - name : Install dependencies
37
+ run : |
38
+ pip3 -q install pandas plotly sphinx-material
39
+ - name : Generate sphinx website
40
+ run : |
41
+ pushd _stats
42
+ ln -s ../_build/stats/stats.csv stats.csv
43
+ popd
44
+ rm -rf _build/html/* && python3 -m sphinx -W -b html . _build/ html
45
+ - name : Fix permissions
46
+ run : |
47
+ sudo chown $USER _build -R
48
+ - name : Check that no releases or notebooks have been deleted
49
+ run : |
50
+ pushd _build/html
51
+ if [[ $(git ls-files --deleted releases | wc -l) -gt 0 ]]; then
52
+ echo "The following releases have been deleted:"
53
+ git ls-files --deleted releases
54
+ exit 1
55
+ fi
56
+ if [[ $(git ls-files --deleted tests | wc -l) -gt 0 ]]; then
57
+ echo "The following notebooks have been deleted:"
58
+ git ls-files --deleted tests
59
+ exit 1
60
+ fi
61
+ popd
62
+ shell : bash
63
+ - name : Deploy to GitHub pages
64
+ if : github.repository == 'fem-on-kaggle/fem-on-kaggle.github.io' && github.ref == 'refs/heads/main'
65
+ run : |
66
+ SHA_SHORT=$(git rev-parse --short HEAD)
67
+ pushd _build/html
68
+ git config user.name "GitHub Actions"
69
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
70
+ git add .
71
+ git pull origin gh-pages
72
+ [ -n "$(git status --porcelain=v1 2>/dev/null)" ] && git commit -m "deploy: ${SHA_SHORT}"
73
+ git push origin gh-pages
74
+ popd
75
+ shell : bash
76
+ - name : Deploy to GitHub artifacts
77
+ if : github.repository == 'fem-on-kaggle/fem-on-kaggle.github.io' && github.ref != 'refs/heads/main'
78
+ uses : actions/upload-artifact@v3
79
+ with :
80
+ name : website
81
+ path : _build/html
82
+ retention-days : 1
83
83
84
84
warn :
85
85
runs-on : ubuntu-latest
86
86
if : github.repository == 'fem-on-kaggle/fem-on-kaggle.github.io' && github.ref == 'refs/heads/main' && github.event_name == 'schedule'
87
87
steps :
88
- - name : Warn if scheduled workflow is about to be disabled
89
- uses : fem-on-colab/warn-workflow-about-to-be-disabled-action@main
90
- with :
91
- workflow-filename : website.yml
92
- days-elapsed : 50
88
+ - name : Warn if scheduled workflow is about to be disabled
89
+ uses : fem-on-colab/warn-workflow-about-to-be-disabled-action@main
90
+ with :
91
+ workflow-filename : website.yml
92
+ days-elapsed : 50
0 commit comments