Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
delarosatrevin authored Jun 22, 2022
1 parent cc8c941 commit 8776709
Showing 1 changed file with 50 additions and 29 deletions.
79 changes: 50 additions & 29 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,77 @@ Building the documentation (requires GitHub user)

**Step 1:** Install anaconda ( or miniconda)

**Step 2:** Create a new environment and activate it
**Step 2:** Create a new environment and install dependencies

.. code-block:: bash
conda create --name=cryoem-docs
conda activate cryoem-docs
**Step 3:** Install required dependencies

.. code-block:: bash
pip install sphinx sphinx_rtd_theme
**Step 4:** Clone the repository and build docs
**Step 3:** Clone the repository and build docs

.. code-block:: bash
git clone git@github.com:cryoem-sweden/docs.git
cd docs
make html
Updating the documentation (requires GitHub user)
-------------------------------------------------

* Make sure you are able to build the docs as stated in the previous section
* cd docs
* git pull # update with new changes
* edit files or add new files
* make html (or make clean html to completely rebuild)
* Review generated html at: /path/to/docs/_build/html/index.html
* Commit changes:
* git add
* git commit -m "Messages about your changes"
* git push
Before updating the documentation, make sure you are able to build the docs as
stated in the previous section. Then follow these steps:

**Step 1:** Update your local folder with latest changes

.. code-block:: bash
cd /path/to/docs
git pull --prune
**Step 2:** Make changes: edit existing files or add new ones (including images). Then build the documentation:

.. code-block:: bash
make html # (or make clean html for a complete rebuild)
**Step 3:** Review generated html at: /path/to/docs/_build/html/index.html. Then commit the changes.

.. code-block:: bash
git add .
git commit -m "Messages about your changes"
git push
Publishing the changes online (requires GitHub user)
----------------------------------------------------

* Update 'master' branch with latest changes
* cd docs
* git checkout master
* git pull # update with new changes
* git checkout html
* git make html (or make clean html to completely rebuild)
* Review generated html at: /path/to/docs/_build/html/index.html
* # Copy generated files from _build/html to internal docs folder
* rsync -av _build/html/ docs/
* Commit changes:
* git commit -am "New release of the documentation"
* git push
**Step 1:** Update 'master' branch with latest changes.

.. code-block:: bash
cd /path/to/docs
git checkout master
git pull --prune
**Step 2:** Merge 'master' branch into 'html' one and build the docs.

.. code-block:: bash
git checkout html
git merge master
make html # (or make clean html for a complete rebuild)
Review generated html at: /path/to/docs/_build/html/index.html
**Step 3:** Copy build into 'docs' folder of the 'html' branch and push changes.

.. code-block:: bash
# Copy generated files from _build/html to internal docs folder
rsync -av _build/html/ docs/
git commit -am "New release of the documentation"
git push

0 comments on commit 8776709

Please sign in to comment.