No description
realaravinth
325d110e9a
DESCRIPTION Branch switching wasn't possible in earlier versions. If user deploys "master" branch first and then wants to switch to "pages" branch, they would have to delete the Pages-managed copy of the repository to re-initialize the repository. This patch introduces changes to switch to user configured branch on startup and at each repository update. |
||
---|---|---|
.github | ||
config | ||
docs | ||
scripts | ||
src | ||
.dockerignore | ||
.gitignore | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml | ||
Dockerfile | ||
LICENSE.md | ||
Makefile | ||
README.md |
Why?
SSHing into a server and performing a git pull
is boring. I couldn't
find any free(as in freedom) software for automating static website
deploys like GitHub Pages or Netlify.
This is very minimal, all it does is a git fetch $branch
but it works
for me :)
Usage
-
All configuration is done through ./config/default.toml(can be moved to
/etc/static-pages/config.toml
). Too add a website, make a similar entry:pages = [ { branch = "gh-pages", repo = "https://github.com/realaravinth/realaravinth/", path ="/var/www/pages/realaravinth", secret = "mytopsecretsuperlongpassword123" }, ]
-
If
pages
is deployed atpages.example.com
and you wish to deploy changes fromgh-pages
branch, you can do so with the following command:curl -v --location --request POST 'https://pages.example.com/api/v1/update' \ --header 'Content-Type: application/json' \ --data-raw "{ \"secret\": \"$token\", \"branch\": \"gh-pages\" }"