exp:expstaticgithub
Set a static publishing target up on GitHub (the repository, GitHub Pages from the branch or Actions, the custom domain, HTTPS), show its state there, or sign in with GitHub.
Script bin/php/expstaticgithub.php, code in kernel/private/classes/commands/expstaticgithub.php. Run it from the installation root, as the user the web server runs as:
./console exp:expstaticgithub --help
./console exp:static:github --help
php bin/php/expstaticgithub.php --helpHelp text
GitHub for a static publishing target
setup creates the repository when asked (--create-repo, public unless --private), switches GitHub Pages
on from the target's branch and folder or from GitHub Actions, and sets the custom domain and HTTPS.
status shows the repository, GitHub Pages and the state of the last Pages build. Both sign in with the
target's Credential (token: or app:). signin signs a user in with GitHub (an OAuth App's device flow,
[StaticPublishSettings] GitHubOAuthClientId) and keeps the token as the secret --secret.
./console exp:static:github setup github-public --create-repo
./console exp:static:github setup github-public --pages=actions --plan
./console exp:static:github status github-public
./console exp:static:github signin --secret=github_pages_tokenOptions
| Option | Value | Help |
|---|---|---|
--create-repo | setup: create the repository when it does not exist (empty; the first publish fills it) | |
--public | With --create-repo: a public repository (the default; GitHub Pages on a free plan needs one) | |
--private | With --create-repo: a private repository (GitHub Pages serves it only on a paid plan) | |
--pages | required | setup: branch or actions instead of the target's Delivery, or off to leave GitHub Pages as it is |
--domain | required | setup: this custom domain instead of the target's CustomDomain (none removes it) |
--no-https | setup: do not enforce HTTPS for the custom domain | |
--plan | setup: only say what would be done, change nothing | |
--client-id | required | signin: the client id of the OAuth App (default [StaticPublishSettings] GitHubOAuthClientId) |
--secret | required | signin: the name of the secret the token is kept as (Setup > Secrets); the target names it as Credential=token:<secret> |
--format | required | text (default) or json (the machine output exp-static/1) |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Arguments: [action][target].
Related
Generated by ./console exp:help:examples from bin/php/expstaticgithub.php, kernel/private/classes/commands/expstaticgithub.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.