Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.01 KiB
Newer Older
Torben Böhnke's avatar
Torben Böhnke committed
pages:
  stage: deploy
  script:
Torben Böhnke's avatar
Torben Böhnke committed
  - echo 'Nothing to do...'
  artifacts:
    paths:
    - public
  only:
  - main
  tags:
  - pages
Torben Böhnke's avatar
Torben Böhnke committed

fetch_calendar:
  before_script:
    - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
    - eval $(ssh-agent -s)
    - echo "$GIT_SSH_PRIV_KEY" | tr -d '\r' | ssh-add - > /dev/null
    - mkdir -p ~/.ssh
    - chmod 700 ~/.ssh
    - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
    
  script:
    - mkdir -p data
    - curl -o data/calendar.ics https://mail.exchange.ruhr-uni-bochum.de/owa/calendar/c35486a95ce0458084511f72258a0ae2@it-services.ruhr-uni-bochum.de/ebd8081528364481b4fe87794a3e8776659663570677531713/calendar.ics
    - git config user.email "makerspace@ruhr-uni-bochum.de"
    - git config user.name "Makerspace-GitLab CI"
    - git add data/calendar.ics
    - git commit -m "Update calendar" || echo "No changes to commit"
    - git push origin master

  only:
    - schedules