Commit 033c2645 authored by Wohlgemuth, Jason's avatar Wohlgemuth, Jason
Browse files

ci: Add PDF preview to merge requests

parent 84abe687
Loading
Loading
Loading
Loading
+20 −12
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ default:
  image: ubuntu
  before_script:
    - apt-get update
    - apt-get install -y curl git
    - apt-get install -y curl git npm
    - curl -LO https://code.ornl.gov/api/v4/projects/16689/packages/generic/x86_64-unknown-linux-gnu/v${ACORN_VERSION}/acorn
    - chmod +x ./acorn
    - mv acorn /usr/local/bin
@@ -13,20 +13,28 @@ default:
    - acorn --version
    - vale -v

variables:
  USER: CI
  EMAIL: wohlgemuthjh@ornl.gov

stages:
  - analysis
  - check
  - preview

analysis:
  stage: analysis
run-check:
  stage: check
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  inherit:
    default: true
    variables: true
  script:
    - acorn help
    - acorn check --commit HEAD -vvv

generate-pdf:
  stage: preview
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  script:
    - npx playwright install-deps
    - acorn export --commit HEAD --output ./export
  artifacts:
    name: PDF_EXPORT_PREVIEW
    expose_as: PDF Export Preview
    expire_in: 1 week
    paths:
      - export
 No newline at end of file