ttskch / markdown-pdf-googledrive-ci-sample

A sample of converting Markdown to PDF and deploying to Google Drive with CircleCI 2.0

Home Page:https://blog.ttskch.com/markdown-pdf-circleci-googledrive-deploymen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markdown-pdf-googledrive-ci-sample

A sample of converting Markdown to PDF and deploying to Google Drive with CircleCI 2.0

Mechanism

Preparing

1. Create a Service Account

  1. Go to Google API Console
  2. Create a new Service Account in some project
  3. Download the credential json file

2. Register the credential of Service Account as an envvar on CircleCI

  1. Make the credential json "one line" and copy it
  2. Go to https://circleci.com/gh/{user}/{project}/edit#env-vars and add the copied credential as a new envvar named GOOGLE_SERVICE_ACCOUNT_CREDENTIAL image

3. Allow the Service Account to access the target folder on Google Drive

  1. Show the email address of the Service Account and copy it image
  2. Share the target folder to the Service Account with "edit" access, and copy the folder id image
  3. Replace {parent_folder_id_here} of .circleci/config.yml with the copied folder id

Result example

image

About

A sample of converting Markdown to PDF and deploying to Google Drive with CircleCI 2.0

https://blog.ttskch.com/markdown-pdf-circleci-googledrive-deploymen/

License:MIT License


Languages

Language:CSS 100.0%