Skip to content

Instantly share code, notes, and snippets.

@tetov
Last active August 11, 2022 09:15
Show Gist options
  • Save tetov/b857d8339661a3a7ac5ecb10a626bd66 to your computer and use it in GitHub Desktop.
Save tetov/b857d8339661a3a7ac5ecb10a626bd66 to your computer and use it in GitHub Desktop.
# Set environment variable
variables:
CANVAS_COURSE_CODE: 0
# Update this value to the correct course code
default:
tags:
- docker-executor
image: "python:3.9"
before_script:
- python3 -m pip install canvasapi
canvas_push:
script:
- |
git clone --depth=1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.control.lth.se/regler/canvassync.git
python3 canvassync/canvas_sync.py
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # run only for pushes to main/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment