Deploy ephemeral websites.
Project description
Smokeshow CLI
CLI to deploy ephemeral websites, see smokeshow.helpmanual.io for more information.
Installation
pip install smokeshow
Usage
To get help on usage, run:
smokeshow --help
To generate an upload key, use:
smokeshow generate-key
You should then set the key as an environment variable with
export SMOKESHOW_AUTH_KEY='...'
With that, you can upload a site with:
smokeshow upload path/to/upload
For more help run smokeshow upload --help
, if you run smokeshow upload
without either
setting the SMOKESHOW_AUTH_KEY
environment variable or using the --auth-key
option, smokeshow will generate
a new upload key before uploading the site.
If you're having trouble with python versions and accessing the CLI, you can also run the smokeshow library module as a script via
python -m smokeshow
GitHub actions & commit status integration
I build smokeshow primarily to preview documentation and coverage generate with github actions.
smokeshow therefore integrates directly with github actions to add a status to commits with a link to the newly created ephemeral site.
In addition, smokeshow has custom logic to extract the total coverage figure from coverage.py HTML coverage reports to both annotate commit status updates and decide if the commit status is "success" or "failure".
Example of setting the commit status from a github action:
- run: smokeshow upload cli/htmlcov
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: CLI Coverage {coverage-percentage}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 50
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
(this is taken directly from smokeshow's own CI, see here)
The following environment variables are used when setting commit statuses:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION
(or alternatively the--github-status-description
CLI option) set the description for the commit status; the string{coverage-percentage}
has a special meaning and will be replaced by the actual coverage percentage if it can be extract from the rootindex.html
file being uploaded, this must be set for smokeshow to set the commit statusSMOKESHOW_GITHUB_COVERAGE_THRESHOLD
(or alternatively the--github-coverage-threshold
CLI option) decide the "state" of the commit status update;success
is used if either the total coverage number isn't available or it's above the threshold,failure
is used if the coverage number is below this thresholdSMOKESHOW_GITHUB_TOKEN
this is used to authenticate the status update, more details hereSMOKESHOW_GITHUB_PR_HEAD_SHA
or if it's omitted or emptyGITHUB_SHA
(which is set automatically by github actions) are used to decide which commit to set the status on. TheSMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
trick shown above is required since github set theGITHUB_SHA
env var to a merge commit on pull requests which isn't what you wantSMOKESHOW_GITHUB_CONTEXT
suffix for github status contextGITHUB_REPOSITORY
is set automatically by github actions, it's used to choose the repo to set the status on
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file smokeshow-0.4.0.tar.gz
.
File metadata
- Download URL: smokeshow-0.4.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c767c7a4753187aee065b090d6739cfabbbd04a9cd6648c23e450737d8a6191 |
|
MD5 | fa834eb50f6916a355b19013d69cef8a |
|
BLAKE2b-256 | ee8551c81cb5bd9bc1c9bb9cca4d6c4f182cf070e958d245c344a60e9906c5d9 |
File details
Details for the file smokeshow-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: smokeshow-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 472d975eeeae140d80cc7f289f6ed2e89190984fa12e2cdad67e929e2db48da6 |
|
MD5 | 1c4dcedd96ebdf5d981b5fe4c5b37fed |
|
BLAKE2b-256 | 3da6cf66cfcf99f97f6a3afd3c214ed99738a10f2946478686f0e53ba06dd828 |