GithubHelp home page GithubHelp logo

Comments (3)

tabatkins avatar tabatkins commented on June 16, 2024

I suggest setting up the server's folder structure as the working directory of a bare repo, then just cronning a commit once a day or something. I set up my own website this way and have some instructions at https://www.xanthir.com/b4or0. You can also push this to github if you want to make it more easily publicly accessible.

from whatwg.org.

annevk avatar annevk commented on June 16, 2024

cc @foolip @sideshowbarker

from whatwg.org.

tabatkins avatar tabatkins commented on June 16, 2024

Hm actually a bare repo probably isn't what you want - you're not gonna use git to publish to the server, you just want to snapshot the server to git regularly.

So you probably then just want to set up a normal repo, either using the server's web folder (hiding the .git folder from being served), or to the side and marking the web folder as the working tree, then cron a regular commit + push to GH.

I do something like for a different part of my website (my recipe database, which is updated via the site itself but mirrored to GH for safekeeping), and just have a cron command that looks like:

> cd /home/protected/db/recipes && git commit -am "update" && GIT_SSH_COMMAND='ssh -i /home/private/recipe-db_ssh/sshkey' git push origin master

This does rely on the GH being purely a mirror, never being pushed to, otherwise you'll need to manually pull from the server side to get back up to date. (or do a force push and just blow away any changes that accidentally get made at the GH side)

from whatwg.org.

Related Issues (20)

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.