GithubHelp home page GithubHelp logo

dewey363 / hexo-webhook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leafney/hexo-webhook

0.0 2.0 0.0 3.98 MB

hexo博客通过webhook自动部署到个人VPS

Shell 21.72% Go 67.73% Dockerfile 10.55%

hexo-webhook's Introduction

gin for hexo blog through webhook automatic deployment

README中文

Docker Env

  • CLONE_URL - Required,Git repository url for https://
  • USER_NAME - The item is set when using a private repository,for username.
  • USER_TOKEN - The item is set when using a private repository,for user token. more info

Docker run

$ docker run -it --name bloghook --restart=always -d -p 127.0.0.1:8666:8080 -p 127.0.0.1:8665:80 -e CLONE_URL="https://github.com/Leafney/Leafney.github.io.git" leafney/hexo-webhook:latest
  • 8080 github webhook
  • 80 hexo blog

Run by Docker-Compose

install docker-compose
$ sudo pip install --upgrade pip
$ pip install -U docker-compose
$ docker-compose -v
docker-compose local file
$ git clone https://github.com/Leafney/hexo-webhook.git
$ cd hexo-webhook
$ docker-compose build
$ docker-compose up -d
docker-compose by dockerhub image
$ ls
docker-compose-hexo.yml
$ docker-compose -f ./docker-compose-hexo.yml up -d

build ONCE after Docker run

After the container starts, visit the browser to display 404 pages. You need to get online blog files first to the container.

$ docker exec bloghook /bin/sh /app/build.sh

And then,it works!


go build

If you want to change the default secret of itfanr.cc ,you need to compile the golang program by yourself.

Compile the golang program for linux :

$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go

view logs

The main log files directory is /app/logs/ in container. You can see it by the following commands:

$ docker exec -it bloghook /bin/sh
$ cd /app/logs
$ vi ginweb_stdout.log

gohook-1.0

The default webhook secret is itfanr.cc. If you want to change, please compile the golang program main.go by yourself.

gohook-2.0

Wellcome Page for Settings:

  1. webhook secret
  2. webhook say hello words
  3. git clone url
  4. git clone username
  5. git clone usertoken
  6. send email notify
  7. show log detail page
  8. Select operation branch

hexo-webhook's People

Contributors

leafney avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.