0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Azure DevOps PipelinesでAsciidocのPDF化

Last updated at Posted at 2022-03-24

Pipelinesでやっていること

  • 前提
    • trigger:masterかfeatureでdoc配下が更新された時
    • asciidocのtheme、fontがdoc配下にある状態
  1. BaseとなるRubyインストール
  2. JREインストール
  3. PlantUML環境のインストール
  4. asciidoc用ライブラリインストール
  5. asciidocのPDF化
  6. Artifactで回収
azure_pipelines.yml
# Ruby
# Package your Ruby project.
# Add steps that install rails, analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/ruby

trigger:
  branches:
    include:
    - master
    - feature/*
  paths:
    include:
    - doc

pool:
  vmImage: ubuntu-latest

steps:
- task: UseRubyVersion@0
  inputs:
    versionSpec: '>= 2.5'

- script: |
    sudo apt -y install default-jre
  displayName: "JRE install"

- script: |
    sudo apt -y install graphviz
    sudo apt -y install fonts-takao
  displayName: "PlantUML install"

- script: |
    gem install asciidoctor
    gem install asciidoctor-pdf -v "1.5.4"
    gem install coderay
    gem install asciidoctor-pdf-cjk
    gem install asciidoctor-diagram
    gem install concurrent-ruby
  displayName: 'gem install lib'

- script: |
    asciidoctor-pdf -r asciidoctor-diagram -r asciidoctor-pdf-cjk -a pdf-style=default-theme.yml -a pdf-stylesdir=doc/_pdf_themes -a pdf-fontsdir=doc/_pdf_fonts doc/*.adoc -o 

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact: Asciidoc'
  inputs:
    PathtoPublish: doc
    ArtifactName: 'Asciidoc'

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?