diff --git a/Makefile b/Makefile index f079f1e..019a72a 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,11 @@ demo: printf "demo\nABlog\nABlog Team\nhttp://ablog.readthedocs.org" | ablog start install: - pip install -U --no-deps --force-reinstall . + sudo pip install -U --no-deps --force-reinstall . rebuild: cd docs; watchmedo shell-command --patterns='*.rst' --command='ablog build' --recursive release: python setup.py register - python setup.py sdist upload \ No newline at end of file + python setup.py sdist upload diff --git a/ablog/__init__.py b/ablog/__init__.py index 2d59106..9d79424 100755 --- a/ablog/__init__.py +++ b/ablog/__init__.py @@ -8,7 +8,7 @@ from .post import (PostDirective, PostListDirective, UpdateDirective, generate_archive_pages, generate_atom_feeds, missing_reference) -__version__ = '0.7.0' +__version__ = '0.7.1' def anchor(post): diff --git a/docs/manual/ablog-commands.rst b/docs/manual/ablog-commands.rst index 01c3ec9..168f288 100644 --- a/docs/manual/ablog-commands.rst +++ b/docs/manual/ablog-commands.rst @@ -96,17 +96,19 @@ server and open up browser tab to view your website. :: $ ablog serve -h - usage: ablog serve [-h] [-n] [-p PORT] [-w WEBSITE] + usage: ablog serve [-h] [-w WEBSITE] [-p PORT] [-n] [-r] [--patterns] Serve options can be set in conf.py. Default values of paths are relative to conf.py. optional arguments: -h, --help show this help message and exit - -n do not open website in a new browser tab - -p PORT port number for HTTP server; default is 8000 -w WEBSITE path for website, default is _website when `ablog_website` is not set in conf.py + -p PORT port number for HTTP server; default is 8000 + -n do not open website in a new browser tab + -r rebuild when a file matching patterns change or get added + --patterns patterns for triggering rebuilds .. _deploy: diff --git a/docs/manual/auto-github-pages-deploys.rst b/docs/manual/auto-github-pages-deploys.rst new file mode 100644 index 0000000..3f68e37 --- /dev/null +++ b/docs/manual/auto-github-pages-deploys.rst @@ -0,0 +1,99 @@ +Automate GitHub Pages Deploys +============================= + +.. post:: Jun 15, 2015 + :tags: deploy, tips + :category: Manual + :author: Ahmet + :location: Denizli + :language: en + + +If being away from your personal computer is holding you from blogging, keep +reading. This post will show you how to automate builds and deploys using +Travis CI. Once you set this up, all you need to do post an article will be +pushing to GitHub or creating a new file on GitHub.com from any computer! + +For this to work, you need to be hosting your website on GitHub pages. +If you are not already doing so, see :ref:`deploy-to-github-pages`. + + +Signup for Travis CI +-------------------- + +Travis CI is a continuous integration service used to build and test projects +hosted at GitHub. You can easily sync your GitHub projects with Travis CI +by logging to Travis CI using your GitHub account: + +.. figure:: images/TravisCI_login.png + :scale: 30 % + :align: center + + +Once you login, go to :guilabel:`Account` page and flick the switch on for your GitHub +pages source repository. In the below example, source repository is **website** +and will be pushed to *abakan.github.io*: + +.. figure:: images/TravisCI_accounts.png + :scale: 30 % + :align: center + + +Deploy key setup +---------------- + +To have builds pushed from Travis CI to GitHub, you will need a *personal access +token*. Go to GitHub :menuselection:`Settings --> Personal access tokens` page to +generate a new token. You need only *public repo* access checked for this purpose: + +.. figure:: images/GitHub_token.png + :scale: 30 % + :align: center + + +Then, you need to set this access token as an environment variable, e.g. +``DEPLOY_KEY``, under :menuselection:`Settings --> Environment Variables`. +Keep the :guilabel:Display value in build logs` switch off. + +.. figure:: images/TravisCI_settings.png + :scale: 30 % + :align: center + + +Also, do not forget to flick :guilabel:`Build pushes` on under +:menuselection:`Settings --> General Settings`: + +.. figure:: images/TravisCI_global.png + :scale: 60 % + :align: center + +Configuration file +------------------ + +Finally, you need a :file:`.travis.yml` in your project that looks like the +following: + + +.. code-block:: yaml + + language: python + + python: + - 2.7 + + virtualenv: + system_site_packages: true + + before_install: + - pip install ablog + + script: + - ablog build + + after_success: + - git config --global user.name "Your Name" + - git config --global user.email "yourname@domain.com" + - git config --global push.default simple + - ablog deploy --push-quietly --github-token=DEPLOY_KEY -m="`git log -1 --pretty=%B`" + + diff --git a/docs/release/ablog-v0.7-released.rst b/docs/release/ablog-v0.7-released.rst index 928a5c4..2558dad 100644 --- a/docs/release/ablog-v0.7-released.rst +++ b/docs/release/ablog-v0.7-released.rst @@ -1,4 +1,4 @@ -ABlog v0.7.0 released +ABlog v0.7 released =================== .. post:: May 3, 2015 @@ -11,3 +11,14 @@ ABlog v0.7.0 is released to fix the long standing :issue:`1` related to pickling of Sphinx build environment on Read The Docs. Improvements also resolved issues with using LaTeX builder, improved cross-referencing for non-html builders. + + +ABlog v0.7.1 released +--------------------- + +.. post:: Jun 15, 2015 + :author: Ahmet + :category: Release + :location: SF + +ABlog v0.7.1 is released to fix import issues in :ref:`ablog-serve` command.