generated from tanjeffreyz/planit
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.64 KB
/
main.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Planit
on:
push:
branches: [ main ]
schedule:
- cron: '30 */1 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upgrade to latest Planit version
run: |
git config --global user.name 'planit'
git config --global user.email '[email protected]'
git config --global pull.rebase false
git remote add planit 'https://github.com/tanjeffreyz/planit.git'
git fetch planit
git checkout planit/main -- .
git checkout HEAD -- data || true
git checkout HEAD -- .github
git commit -m 'Upgraded to latest Planit version' || true
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Retrieve assignment information
run: |
python --version
python main.py
env:
GRADESCOPE_USER: ${{ secrets.GRADESCOPE_USER }}
GRADESCOPE_PASSWORD: ${{ secrets.GRADESCOPE_PASSWORD }}
- name: Commit new outputs
run: |
git add . || true
git commit -m 'Updated assignments' || true
git push origin main
git push -f origin main:github-pages