First deployment
This guide shows how to publish a website from a local directory or a Git repository.
Publish a local directory
For a custom domain, the command has the following form:
$ git-pages-cli https://www.example.org --password xyz --upload-dir site-contents
Replace site-contents with the directory containing your generated website.
For a Gitnet Forge-hosted website, use your account domain and the path assigned to the repository. For example:
$ git-pages-cli https://username.gitnet.fr/my-project --token "$GIT_PAGES_TOKEN" --upload-dir site-contents
The exact URL format for your Gitnet Forge instance should be confirmed with its administrator.
Publish a Git repository
You can ask the server to fetch a Git repository that is available on the Internet:
$ git-pages-cli https://www.example.org --password xyz \
--upload-git https://codeberg.org/username/example.org.git
The password can be omitted if the repository is allowlisted through DNS:
$ git-pages-cli https://www.example.org \
--upload-git https://codeberg.org/username/example.org.git
Check an operation first
The --dry-run option checks authorization without performing the requested operation:
$ git-pages-cli https://www.example.org --password xyz \
--delete --dry-run
Use it before an operation when you want to verify that the supplied credentials are accepted.
First HTTPS deployment on a custom domain
The server cannot obtain a TLS certificate for a domain before a site has been published on that domain. For the first deployment, either use HTTP or specify a hostname for which the server already has a certificate with --server:
$ git-pages-cli https://www.example.org --server gitnet.page \
--password xyz --upload-dir site-contents
Replace gitnet.page with the actual certified hostname of your git-pages server if it differs.
This limitation concerns the first publication on a domain; it is not a requirement to keep the website on HTTP.