Deployment mode. - “gh-actions”: Deploys from a branch with GitHub Actions. Mostly hands-off, though note that you will still need to go to your repos settings –> pages –> Github Actions so that the generated workflow has permission to run. - “manual”: Deploy directly from a branch - manual github pages settings required. This will still generate some additional required files, but you will need to follow the provided instructions to get the files to build.
"gh-actions"
use_docs
bool
If True, serve from the docs/ folder. Otherwise serve from the repo root. If you have used the pack function previously to create your app file, match the option you used there. Defaults to True (which matches the pack function.)
True
only_on_index
bool
If True, trigger deployment only when index.html changes. Ignored if mode = “manual” Defaults to True
True
branch
str
Branch to use as source. Ignored if mode = “manual” Defaults to ‘main’.
'main'
root_dir
str
Determine whether to move to a different directory prior to creation of outputs. The function needs to know where the root (top-level) folder of your repository is in relation to the folder the script running the function is. Should only be needed if folder packing file is being run from is not the repository root (e.g. you have your app stored within an ‘apps’ folder). To move up one directory, pass “..” To move up two directories, pass “../..” And so on. Default is ‘current_dir’.
'current_dir'
create_nojekyll
bool
Determines whether to create a .nojekyll file, which will prevent the deployed app from being run through post-processing steps on Github. Default is True.
True
create_404
str
Determines whether to create a 404 file, which will ensure you are redirected in the case of a url path not being found. This is more common with stlite files as refreshing while on a subpage or trying to navigate directly to a subpage will cause an error. If “relative”, the 404 will just try to navigate the user one level up, which should generally be correct unless they have arrived via a faulty URL. If “none”, will not be created. If any other value, this will be treated as the absolute URL to redirect to. Default is “relative”.
'relative'
Returns
Name
Type
Description
Path or None
Path to created workflow file (gh-actions mode), or Path to helper instructions file (main mode). In both cases, a .nojekyll file will be created in the repo root and in the docs folder if it is present. In gh-actions model, a deploy.yml will be created in the .github/workflows folder, relative to the provided file. This folder will be created if it does not exist.