pages-server
is a simple server that serves pages from Gitea repositories.
It works in three modes:
- Repository with
pages-branch
topic should havegh-pages
orgh-pages-VERSION
branched, whereVERSION
is a version of the docs - Repository with
pages-release
topic should have release withdocs.zip
attachment with a zipped pages site. - Repository with
pages-packages
topic should have corresponding Gitea package with a zipped pages site withdocs.zip
name. E.g. forgitea.com/owner/repo
there should be a generic package repositoryrepo
ingitea.com/owner
with a file calleddocs.zip
containing the site.
This server will not build any content on its own. It will only serve existing code.
- Every valid Gitea user is authenticated with Gitea using OAuth2 (configured using
AUTH_GITEA_OAUTH_CLIENT_ID
andAUTH_GITEA_OAUTH_CLIENT_SECRET
). pages-server
uses the users' oauth token to check if the user has access to the repository.- If the user has access to the repository,
pages-server
fetches the latest version of the repository usingGITEA_ADMIN_TOKEN
and caches it in the bbolt database. pages-server
serves the pages from the bbolt database.
pages-server dev
pages-server simple pages server for small-to-medium gitea installations
USAGE:
pages-server [global options] [arguments...]
GLOBAL OPTIONS:
--pages-url value url for pages server (default: "http://localhost:8000") [$PAGES_URL]
--pages-title value title for pages server (default: "Gitea Pages") [$PAGES_TITLE]
--gitea-url value url for Gitea (default: "http://localhost:3000") [$GITEA_URL]
--gitea-admin-token value admin token for Gitea [$GITEA_ADMIN_TOKEN]
--gitea-hook-secret value secret for gitea webhooks [$GITEA_HOOK_SECRET]
--gitea-pages-addr-from-gitea value url for pages server as viewed from gitea (default: "http://localhost:8000") [$GITEA_PAGES_ADDR_FROM_GITEA]
--database-filename value path to database (default: "pages-server.db") [$DATABASE_FILENAME]
--auth-cookie-name value name of cookie for oauth state (default: "__i_love_pages_server") [$AUTH_COOKIE_NAME]
--auth-secret value secret for auth (default: "CHANGEME") [$AUTH_SECRET]
--auth-gitea-oauth-client-id value oauth2 app client id from Gitea [$AUTH_GITEA_OAUTH_CLIENT_ID]
--auth-gitea-oauth-client-secret value oauth2 app client secret from Gitea [$AUTH_GITEA_OAUTH_CLIENT_SECRET]
--server-addr value address to listen on (default: "localhost:8000") [$SERVER_ADDR]
--help, -h show help
--version, -v print the version