stages:
- deploy

# Deployment is done in a reverse manner.
# Instead of rsyncing the files on the servers, we notify them.
# They will `git pull` the master by themselves.
deploy:
  stage: deploy
  image: appropriate/curl:latest
  script:
  - echo "Sending hook(s) to the production server(s)…"
  - curl --no-buffer --silent --show-error https://courses.m3p2.ljbac.com/sync
  - echo "Deployed!"

# Ideally we should test all the pages of the website
# and assert that they respond with either a 2XX or 3XX HTTP status code.
# That should allow us to catch badly formed Markdown, YAML or file paths..