Github Action

Use Calibre’s GitHub Action to automate CI/CD workflows with Calibre. The action is a wrapper around Calibre CLI, so you can run CLI commands as part of your build process.


Add a .github/workflows/calibre.yml file to your repository to install the action. See the action README for more information..

Example workflow: Create a deployment

  1. Create an API token for the Calibre API. Add the API Token to a GitHub Repository secret named CALIBRE_API_TOKEN.
  2. Obtain a Site slug identifier from Calibre by visiting Site → Settings → General. Add the Site slug to a GitHub Repository secret named CALIBRE_SITE_SLUG.
  3. Create a .github/workflows/calibre.yml workflow file:
1name: Create deploy marker in Calibre
3 push:
4 branches:
5 - main
8 build:
9 name: calibreapp/github-actions
10 runs-on: ubuntu-latest
11 steps:
12 - name: Create deploy
13 uses: calibreapp/github-actions@main
14 env:
16 with:
17 command: site create-deploy --site=${{ secrets.CALIBRE_SITE_SLUG }} --revision=${{ env.GITHUB_SHA }} --repository${{ env.GITHUB_REPOSITORY }}
18 - name: Get result
19 run: echo "${{steps.set-result.outputs.result}}"

Merges to the main branch will trigger the workflow and create a deploy marker in Calibre.