-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation publishing automation (#348)
* Add documentation publishing automation This commit adds a github actions CI job that will run on each merged commit that will trigger a documentation build and publish the contents to https://qiskit.org/documentation/metal when the repo is made public and CI can be run. * restored makefile to output to _build instead of build
- Loading branch information
Showing
9 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: Docs Publish | ||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U virtualenv setuptools wheel tox | ||
sudo apt-get install graphviz pandoc qt5-default | ||
- name: Build and publish | ||
env: | ||
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }} | ||
encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }} | ||
QISKIT_DOCS_BUILD_TUTORIALS: 'always' | ||
run: | | ||
tools/deploy_documentation.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
#!/bin/bash | ||
|
||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2018, 2019. | ||
# | ||
# This code is licensed under the Apache License, Version 2.0. You may | ||
# obtain a copy of this license in the LICENSE.txt file in the root directory | ||
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Any modifications or derivative works of this code must retain this | ||
# copyright notice, and modified files need to carry a notice indicating | ||
# that they have been altered from the originals. | ||
|
||
# Script for pushing the documentation to the qiskit.org repository. | ||
set -e | ||
|
||
curl https://downloads.rclone.org/rclone-current-linux-amd64.deb -o rclone.deb | ||
sudo apt-get install -y ./rclone.deb | ||
|
||
RCLONE_CONFIG_PATH=$(rclone config file | tail -1) | ||
|
||
# Build the documentation. | ||
tox -edocs -- -j auto | ||
|
||
echo "show current dir: " | ||
pwd | ||
|
||
# Push to qiskit.org website | ||
openssl aes-256-cbc -K $encrypted_rclone_key -iv $encrypted_rclone_iv -in tools/rclone.conf.enc -out $RCLONE_CONFIG_PATH -d | ||
echo "Pushing built docs to website" | ||
rclone sync --progress ./docs/_build/html IBMCOS:qiskit-org-web-resources/documentation/metal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters