-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (46 loc) · 1.34 KB
/
maintenance.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
name: Maintenance
on: [push, pull_request]
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Run clean up bib files
run: python scripts/actions/cleanup.py
- name: Commit changes
run: sudo bash scripts/actions/commit_action.sh
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
checks:
needs: cleanup
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install packages
run: pip install -r tests/requirements.txt
- name: Run bib file inspection
run: pytest
websites-workflow-dispatch:
needs: checks
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Trigger rebuild of the websites
run: bash scripts/actions/build_websites.sh
env:
WEB_TEAM_TOKEN: ${{ secrets.WEB_TEAM_TOKEN }}