https://github.com/ttskch/markdown-pdf-googledrive-ci-sample
A sample of converting Markdown to PDF and deploying to Google Drive with CircleCI 2.0
https://github.com/ttskch/markdown-pdf-googledrive-ci-sample
circleci circleci2 deploy google-drive markdown pdf
Last synced: about 2 months ago
JSON representation
A sample of converting Markdown to PDF and deploying to Google Drive with CircleCI 2.0
- Host: GitHub
- URL: https://github.com/ttskch/markdown-pdf-googledrive-ci-sample
- Owner: ttskch
- License: mit
- Created: 2018-05-13T05:24:56.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T02:51:05.000Z (about 5 years ago)
- Last Synced: 2025-02-08T12:25:13.754Z (4 months ago)
- Topics: circleci, circleci2, deploy, google-drive, markdown, pdf
- Language: CSS
- Homepage: https://blog.ttskch.com/markdown-pdf-circleci-googledrive-deploymen/
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# markdown-pdf-googledrive-ci-sample
A sample of converting Markdown to PDF and deploying to Google Drive with CircleCI 2.0
## Mechanism
* Converts Markdown to PDF with [markdown-pdf](https://github.com/alanshaw/markdown-pdf)
* Deploys PDF to Google Drive with [gdrive](https://github.com/gdrive-org/gdrive)
* Uses [Service Account](https://github.com/gdrive-org/gdrive#service-account) feature to make CircleCI enable to deploy to Google Drive## Preparing
### 1. Create a Service Account
1. Go to [Google API Console](https://console.developers.google.com/)
1. Create a new Service Account in some project
1. 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
1. 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`
### 3. Allow the Service Account to access the target folder on Google Drive
1. [Show](https://console.developers.google.com/iam-admin/serviceaccounts) the email address of the Service Account and copy it

1. Share the target folder to the Service Account with "edit" access, and copy the folder id

1. Replace `{parent_folder_id_here}` of [.circleci/config.yml](.circleci/config.yml#L35) with the copied folder id## Result example
