This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d96f339
commit ca349fd
Showing
1 changed file
with
4 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,8 @@ | ||
# GitHub Actions for [Calibre](https://calibreapp.com) | ||
|
||
Calibre’s GitHub actions wrap our powerful [command line interface](https://calibreapp.com/cli) ([source](https://github.com/calibreapp/cli)) so that you can quickly and effortlessly add Calibre to your GitHub workflows. | ||
## Project deprecation | ||
|
||
That means that any command from CLI can be run using actions! | ||
`github-actions` has been deprecated in favour of using Calibre's Command-line interface (CLI) directly: | ||
|
||
## Usage example | ||
|
||
This example will create a snapshot for a given website that Calibre is tracking. It'll filter out non-master branch pushes. (Likely, your production environment). | ||
|
||
```workflow | ||
name: Create Snapshot | ||
on: | ||
pull_request: | ||
jobs: | ||
build: | ||
name: calibreapp/github-actions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Snapshot | ||
uses: calibreapp/github-actions@main | ||
env: | ||
CALIBRE_API_TOKEN: ${{ secrets.CALIBRE_API_TOKEN }} | ||
with: | ||
command: site create-snapshot --site=${{ secrets.CALIBRE_SITE_SLUG }} | ||
- name: Get result | ||
run: echo "${{steps.set-result.outputs.result}}" | ||
``` | ||
|
||
Inputs: | ||
|
||
- `command` The Calibre CLI command to run e.g. `create snapshot --site=${{ secrets.CALIBRE_SITE_SLUG }} | ||
|
||
Secrets: | ||
|
||
- `CALIBRE_API_TOKEN` is required. Generate a token in Calibre with the required scopes. | ||
- `CALIBRE_SITE_SLUG` is optional, but required for many site based commands. | ||
|
||
References: | ||
|
||
- [Repo](https://github.com/calibreapp/github-actions) | ||
- [Calibre CLI](https://calibreapp.com/cli) | ||
- [CLI Source](https://github.com/calibreapp/cli) | ||
- [Command-line Interface documentation](https://calibreapp.com/docs/automation/cli) | ||
- [CI/CD documentation](https://calibreapp.com/docs/integrations/ci-cd) |