sprung #625
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .github/workflows/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 .github/workflows/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 .github/workflows/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 .github/workflows/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 .github/workflows/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 .github/workflows/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 |