Re-sync with internal repository
[hiphop-php.git] / third-party / watchman / src / website / publish.sh
blob2c2b0e056d266568033dcd3a7e3053c358487e56
1 #!/bin/bash
2 # Copyright (c) Meta Platforms, Inc. and affiliates.
4 # This source code is licensed under the MIT license found in the
5 # LICENSE file in the root directory of this source tree.
7 # stop running if any of these steps fail
8 set -e
9 WATCHMAN=$(hg root)/fbcode/watchman
11 if test ! -d /tmp/watchman-gh-pages ; then
12 git clone -b gh-pages git@github.com:facebook/watchman.git /tmp/watchman-gh-pages
14 cd /tmp/watchman-gh-pages
16 git checkout -- .
17 git clean -dfx
18 git fetch
19 git rebase origin/gh-pages
20 cd "$WATCHMAN/oss/website"
21 docker run --volume "$PWD:/srv/jekyll" --volume "/tmp/watchman-gh-pages:/tmp/jekyll-out" --rm jekyll/jekyll:3 jekyll build -d /tmp/jekyll-out
23 cd /tmp/watchman-gh-pages
24 git add --all
25 git commit -m "update website"
26 git push origin gh-pages