Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.77 KiB
Newer Older
Jennifer Mankoff's avatar
Jennifer Mankoff committed
image: timbru31/ruby-node:3.2

stages:
  - build
  - predeploy
  - generatepdf
  - afterdeploy
Jennifer Mankoff's avatar
Jennifer Mankoff committed

cache:
  paths:
  - vendor/

variables:
  GIT_SUBMODULE_STRATEGY: recursive
  JEKYLL_ENV: production

before_script:
  - export LANG=en_US.UTF-8
  - export LANGUAGE=en_US:en
  - export LC_ALL=en_US.UTF-8
Jennifer Mankoff's avatar
Jennifer Mankoff committed
  - export BUNDLE_PATH=~
  - bundle config set --local path ~
build_production:
    stage: build
Jennifer Mankoff's avatar
Jennifer Mankoff committed
    tags:
Jennifer Mankoff's avatar
Jennifer Mankoff committed
    script:
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        - bundle install
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        - cp _config_production.yml _config.yml
        - cp _layouts/presentation_production.html _layouts/presentation.html
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        - bundle exec jekyll build -d public 
        quarter: 24au
        course: cse493e
        source_path: public
    only:
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        - UACCESS-24fa
    artifacts:
        paths:
            - public/

pre_deploy_production:
    stage: predeploy
    tags:
        - courseweb
    dependencies:
        - build_production
    script:
        - /www/utils/deploycourseweb.sh
    variables:
        quarter: 24au
        course: cse493e
        source_path: public
    only:
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        - UACCESS-24fa

generate_pdf:
    stage: generatepdf
    tags:
        - build
    timeout: 3 hours 30 minutes
    dependencies:
        - build_production
    script:
        - bundle install --path vendor
        - script/deployslidepdf
    variables:
        quarter: 24au
        course: cse493e
        source_path: public
    only:
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        - UACCESS-24fa
    artifacts:
        paths:
            - public/

after_deploy_production:
    stage: afterdeploy
    tags:
        - courseweb
    dependencies:
        - generate_pdf
    script:
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        - /www/utils/deploycourseweb.sh
    variables:
        quarter: 24au
        course: cse493e
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        source_path: public
    only:
Jennifer Mankoff's avatar
Jennifer Mankoff committed
        - UACCESS-24fa