-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (70 loc) · 2.85 KB
/
sprung.yml
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
name: sprung
on:
workflow_dispatch:
schedule:
- cron: '37 8 * * *'
jobs:
sprung:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2 # in order to determine changes
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install beautifulsoup4
pip install cssbeautifier
pip install html5lib
pip install jsbeautifier
pip install requests
- name: configure git identity
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- run: python sprung.py library.caltech.edu lg-public-no-bs.min.css
- name: commit libguides css
run: if [ -n "$(git ls-files --modified --others)" ];
then
git ls-files --modified --others | xargs git add --all;
git commit -m "👽️ libguides css version ${{ env.ASSET_VERSION }}";
fi
- run: python sprung.py library.caltech.edu lg-public-no-bs.min.js
- name: commit libguides js
run: if [ -n "$(git ls-files --modified --others)" ];
then
git ls-files --modified --others | xargs git add --all;
git commit -m "👽️ libguides js version ${{ env.ASSET_VERSION }}";
fi
- run: python sprung.py libcal.caltech.edu LibCal_public.min.css
- name: commit libcal css
run: if [ -n "$(git ls-files --modified --others)" ];
then
git ls-files --modified --others | xargs git add --all;
git commit -m "👽️ libcal css version ${{ env.ASSET_VERSION }}";
fi
- run: python sprung.py libcal.caltech.edu LibCal_public.min.js
- name: commit libcal js
run: if [ -n "$(git ls-files --modified --others)" ];
then
git ls-files --modified --others | xargs git add --all;
git commit -m "👽️ libcal js version ${{ env.ASSET_VERSION }}";
fi
- run: python sprung.py libanswers.caltech.edu LibAnswers_public.min.css
- name: commit libanswers css
run: if [ -n "$(git ls-files --modified --others)" ];
then
git ls-files --modified --others | xargs git add --all;
git commit -m "👽️ libanswers css version ${{ env.ASSET_VERSION }}";
fi
- run: python sprung.py libanswers.caltech.edu LibAnswers_public.min.js
- name: commit libanswers js
run: if [ -n "$(git ls-files --modified --others)" ];
then
git ls-files --modified --others | xargs git add --all;
git commit -m "👽️ libanswers js version ${{ env.ASSET_VERSION }}";
fi
- run: git push