···11-Copyright (C) git-pages contributors
22-Copyright (C) Catherine 'whitequark'
33-44-Permission to use, copy, modify, and/or distribute this software for
55-any purpose with or without fee is hereby granted.
66-77-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
88-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
99-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1010-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1111-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
1212-AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
1313-OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1414-
+14
LICENSE.txt
···11+Copyright (C) git-pages contributors
22+Copyright (C) Catherine 'whitequark'
33+44+Permission to use, copy, modify, and/or distribute this software for
55+any purpose with or without fee is hereby granted.
66+77+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
88+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
99+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1010+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1111+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
1212+AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
1313+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1414+
+32-5
README.md
···3344_git-pages-cli_ is a command-line application for publishing sites to [git-pages].
5566-If you want to publish a site from a Forgejo Actions workflow, use [git-pages/action] instead.
66+> [!TIP]
77+> If you want to publish a site from a CI workflow, use the [Forgejo Action][git-pages-action] instead.
7889[git-pages]: https://codeberg.org/git-pages/git-pages
99-[git-pages/action]: https://codeberg.org/git-pages/action
1010+[git-pages-action]: https://codeberg.org/git-pages/action
101111121213Installation
···1516You can install _git-pages-cli_ using one of the following methods:
161717181. **Downloading a binary**. You can download the [latest build][latest] or pick a [release][releases].
1919+2020+1. **Installing a package**.
2121+2222+ [](https://repology.org/project/git-pages-cli/versions)
182319241. **Using a Docker container**. Choose between the latest build or a [release tag][containers]. Then run:
2025···3944To prepare a DNS challenge for a given site and password:
40454146```console
4747+$ git-pages-cli https://example.org --challenge # generate a random password
4848+password: 28a616f4-2fbe-456b-8456-056d1f38e815
4949+_git-pages-challenge.example.org. 3600 IN TXT "a59ecb58f7256fc5afb6b96892501007b0b65d64f251b1aca749b0fca61d582c"
4250$ git-pages-cli https://example.org --password xyz --challenge
4343-_git-pages-challenge.example.org. 3600 IN TXT "317716dee4379c167e8b5ce9df38eb880e043e5a842d160fe8d5bb408ee0c191"
5151+_git-pages-challenge.example.org. 3600 IN TXT "6c47172c027b3c79358f9f8c110886baf4826d9bc2a1c7d0f439cc770ed42dc8"
4452$ git-pages-cli https://example.org --password xyz --challenge-bare
4545-317716dee4379c167e8b5ce9df38eb880e043e5a842d160fe8d5bb408ee0c191
5353+6c47172c027b3c79358f9f8c110886baf4826d9bc2a1c7d0f439cc770ed42dc8
4654```
47554856To publish a site from a git repository available on the internet (`--password` may be omitted if the repository is allowlisted via DNS):
···7078$ git-pages-cli https://example.org --server grebedoc.dev --password xyz --upload-dir ...
7179```
72808181+### Forge authorization
8282+8383+Uploading a directory to a site on a wildcard domain (e.g. `https://<owner>.grebedoc.dev/<repo>`) requires the use of an access token with push permissions for the corresponding repository (`https://codeberg.org/<owner>/<repo>.git` in this case).
8484+8585+To create such an access token on Forgejo:
8686+1. Open _Settings_ > _Applications_ > _Access tokens_.
8787+1. Expand _Select permissions_, pick _Read and write_ under _repository_.
8888+1. Set _Token name_ to something informative (e.g. "git-pages publishing").
8989+1. Click _Generate token_.
9090+1. The token will appear in a notification (a long string of hexadecimal numbers all on its own).
9191+9292+To deploy using an access token:
9393+9494+```console
9595+$ git-pages-cli https://username.grebedoc.dev --token <token> --upload-dir ...
9696+```
9797+9898+**Keep the access token safe and secure!** Anyone who has it will be able to change the data in any of your repositories.
9999+7310074101Advanced usage
75102--------------
···103130License
104131-------
105132106106-[0-clause BSD](LICENSE-0BSD.txt)
133133+[0-clause BSD](LICENSE.txt)