ARROW-6569: [Website] Add support for auto deployment by GitHub Actions (#24)

* ARROW-6569: [Website] Add support for auto deployment by GitHub Actions

This may have an issue for GitHub Pages deploy for forks. But this
will be fixed by GitHub:

https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869

* Remove all automatic deployment description in README

Because we don't need to do nothing for automatic deployment.

This change also adds a comment hook to show preview URL. Then we
also don't need to describe where is preview URL in README.

* Comment
4 files changed
tree: 4bb74316a20e66ff03feeb83482af6199f1975a6
  1. .github/
  2. _data/
  3. _docs/
  4. _includes/
  5. _layouts/
  6. _posts/
  7. _release/
  8. _sass/
  9. assets/
  10. css/
  11. img/
  12. scripts/
  13. .gitignore
  14. _config.yml
  15. arrow.rdf
  16. blog.html
  17. committers.html
  18. faq.md
  19. Gemfile
  20. index.html
  21. install.md
  22. powered_by.md
  23. README.md
README.md

Apache Arrow Website

Overview

Jekyll is used to generate HTML files from the markdown + templates in this repository. The built version of the site is kept on the asf-site branch, which gets deployed to https://arrow.apache.org.

Adding Content

To add a blog post, create a new markdown file in the _posts directory, following the model of existing posts. In the front matter, you should specify an “author”. This should be your Apache ID if you have one, or it can just be your name. To add additional metadata about yourself (GitHub ID, website), add yourself to _data/contributors.yml. This object is keyed by apacheId, so use that as the author in your post. (It doesn't matter if the ID actually exists in the ASF; all metadata is local to this project.)

Prerequisites

With Ruby >= 2.1 installed, run the following commands to install Jekyll.

gem install jekyll bundler
bundle install

On some platforms, the Ruby nokogiri library may fail to build, in such cases the following configuration option may help:

bundle config build.nokogiri --use-system-libraries

nokogiri depends on the libxml2 and libxslt1 libraries, which can be installed on Debian-like systems with

apt-get install libxml2-dev libxslt1-dev

Previewing the site

Run the following to generate HTML files and run the web site locally.

bundle exec jekyll serve

Updating Code Documentation

To update the documentation, you can run the script ./dev/gen_apidocs.sh in the apache/arrow repository. This script will run the code documentation tools in a fixed environment.

C (GLib)

First, build Apache Arrow C++ and Apache Arrow GLib. This assumes that you have checkouts your forks of arrow and arrow-site alongside each other in your file system.

mkdir -p ../cpp/build
cd ../cpp/build
cmake .. -DCMAKE_BUILD_TYPE=debug
make
cd ../../c_glib
./autogen.sh
./configure \
  --with-arrow-cpp-build-dir=$PWD/../cpp/build \
  --with-arrow-cpp-build-type=debug \
  --enable-gtk-doc
LD_LIBRARY_PATH=$PWD/../cpp/build/debug make GTK_DOC_V_XREF=": "
rsync -r doc/reference/html/ ../../arrow-site/asf-site/docs/c_glib/

JavaScript

cd ../js
npm run doc
rsync -r doc/ ../../arrow-site/asf-site/docs/js

Then add/commit/push from the asf-site/ git checkout.