add build.sh
Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/commit/5bfd6ae8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/tree/5bfd6ae8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-site/diff/5bfd6ae8 Branch: refs/heads/master Commit: 5bfd6ae8484d05ed4de2599be3a4161c34730bce Parents: 0cffb1a Author: Andy Perlitch <[email protected]> Authored: Mon Sep 7 10:04:00 2015 -0700 Committer: Andy Perlitch <[email protected]> Committed: Mon Sep 7 10:04:00 2015 -0700 ---------------------------------------------------------------------- README.md | 24 +++++++++++++----------- build.sh | 9 +++++++++ 2 files changed, 22 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/5bfd6ae8/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 23cf4ba..0c77eff 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,11 @@ This is the source code for the Apache Apex Incubator website, hosted at [apex.i How it works ------------ The master branch of this repo contains the files that are used to generate the HTML that ultimately gets pushed to the incubator site. -The `asf-site` branch is where the actual generated files are stored. -Through a [gitpubsub](http://www.apache.org/dev/gitpubsub.html) mechanism, files are taken from the `asf-branch` and pushed to the live server. +The `asf-site` branch is where the actual generated files are stored. Note that this branch must contain exactly one folder called `content`, +and so has been checked out as an orphan branch with its own commit history apart from the master branch. See the *Building* section below. + +Through a [gitpubsub](http://www.apache.org/dev/gitpubsub.html) mechanism on the apache.org server, +files are taken from the `asf-branch` and pushed to the live server. Partials -------- @@ -43,15 +46,14 @@ Assuming you have a file called `src/md/example_markdown.md`, you could have thi {{> footer}} ``` -Building --------- -Requires nodejs and npm. -```bash -# install dependencies -npm install -# run gulp command -./node_modules/.bin/gulp -``` +Building (requires node+npm) +---------------------------- +Run `build.sh` from the directory. This will: + +- ensure the necessary npm dependencies are installed +- updates the `asf-site` branch with a new commit of the build from the current branch + +You must manually push to the `asf-site` remote branch. Developing ---------- http://git-wip-us.apache.org/repos/asf/incubator-apex-site/blob/5bfd6ae8/build.sh ---------------------------------------------------------------------- diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..211c6ea --- /dev/null +++ b/build.sh @@ -0,0 +1,9 @@ +npm install +./node_modules/.bin/gulp +cp -r content content_tmp +COMMIT_HASH=`git rev-parse HEAD` +git checkout asf-site +rm -rf content +mv content_tmp content +git add content +git commit -m "from $COMMIT_HASH"
