-
Notifications
You must be signed in to change notification settings - Fork 273
CI build and deploy
Our current CI setup requires the following variables defined in your own Pencil2D repo, if you want to successfully be able to build and deploy:
The Google drive parent folder ID's for the nightly builds
- LINUX_X86_64_PARENT - Linux folder
- MACOS_X86_64_PARENT - MacOS folder
- WINDOWS_X86_64_PARENT - Windows 64bit folder
- WINDOWS_X86_PARENT - Windows 32bit folder
How to obtain folder IDs
Getting those folder IDs is actually pretty easy: Just navigate to the folder you want to use on Google Drive, then check the URL. The part after the last slash is the folder id. For example, if the URL is https://drive.google.com/drive/folders/0BxdcdOiOmg-CcU1WOFpCOFBvVXc, the. folder id is 0BxdcdOiOmg-CcU1WOFpCOFBvVXc
.
Authentication with google services
- GOOGLE_PRIVATE_KEY - The JSON file content used for Google Drive authentication, no escaping required
How to obtain a private key
Getting that private key is a bit more involved, unfortunately.
Note: This guide was written in early 2017, when we first started uploading nightly builds to Google Drive automatically. Some details might have changed since then.
- Visit https://console.developers.google.com/ and create a new project:
- Once the project has been created, select the Drive API in the API library:
- Enable the API:
- Now switch to the IAM & Admin section via the menu:
- Switch to the Service accounts screen and create a new service account. The “Furnish a new private key” option must be activated and the JSON format must be selected. After clicking on “CREATE”, a JSON file will be downloaded to your PC. The contents of this file are what you need to store in the GOOGLE_PRIVATE_KEY secret. Go and add it now.
- While we now have the key added to GitHub Actions, you still need to make sure it has access to the folders you want to use. So for each of the folders, select the folder in Google Drive and click on the Share button. Then enter the email address of the service account you just created, make sure it has edit permissions, and confirm:
If you need the documentation deployed to your own doxygen repo, the following key should be defined:
The GitHub token used to update the generated docs in the pencil-docs repo:
- DOCS_REPO_TOKEN
To learn how to create a GitHub access token, please go here.
In addition, the repository path must be updated in the workflow definition itself since, as of this writing, it is hard-coded.