Skip to content

Commit

Permalink
Automatically publish tutorials to learning platform
Browse files Browse the repository at this point in the history
  • Loading branch information
frankharkins committed Sep 27, 2023
1 parent f301204 commit 46bfa84
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,19 @@ jobs:
pip install -U twine pip setuptools virtualenv wheel
python3 setup.py sdist bdist_wheel
twine upload dist/qiskit*
shell: bash
shell: bash

publish-tutorials:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Publish tutorials to learning.quantum-computing.ibm.com
env:
LEARNING_API_TOKEN: ${{ secrets.LEARNING_API_TOKEN_PRODUCTION }}
LEARNING_API_ENVIRONMENT: production
run: |
pip install git+https://github.com/frankharkins/learning-content-tools.git@7295b8441ee937119d22845de33dc62cac782ab2#subdirectory=iql-lesson-sync
cd docs/tutorials
sync-lessons
36 changes: 36 additions & 0 deletions .github/workflows/push-tutorials-to-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# 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.

name: Publish tutorials to staging website

on:
push:
branches:
- "main"

jobs:
publish-tutorials:
runs-on: ubuntu-latest
strategy:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Push tutorials to learning.www-dev.quantum-computing.ibm.com
env:
LEARNING_API_TOKEN: ${{ secrets.LEARNING_API_TOKEN_STAGING }}
LEARNING_API_ENVIRONMENT: staging
run: |
pip install git+https://github.com/frankharkins/learning-content-tools.git@7295b8441ee937119d22845de33dc62cac782ab2#subdirectory=iql-lesson-sync
cd docs/tutorials
sync-lessons
25 changes: 25 additions & 0 deletions docs/tutorials/iql.conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
lessons:
- path: error-suppression-and-error-mitigation
idStaging: 7e6b09d2-58d5-4892-9c70-4a4d662acd22
idProduction: fde8bbfe-d9ca-4afd-b0d5-8317568fd9e1
- path: chsh-with-estimator
idStaging: 0229e597-ac0d-4641-98c8-cb9d6bf10617
idProduction: d4861fee-1dc1-41b2-a5ba-671bc54b747b
- path: grover-with-sampler
idStaging: 9b9b8eec-549a-4f20-822d-c984d0ee7b3d
idProduction: 84dbbc7c-16b5-4aec-b142-9c349bf7a89b
- path: how-to-getting-started-with-estimator
idStaging: 7467fd2c-4a69-4b1b-bef7-b3efe068984e
idProduction: d8ee4662-7c6f-4446-a8a3-5fe79fa71c48
- path: how-to-getting-started-with-sampler
idStaging: cadf4f4f-c662-434f-828b-e25dc48ee57e
idProduction: f0cc58e1-789f-4b57-b1b7-693b84b32290
- path: qaoa-with-primitives
idStaging: 63dd4f57-dda7-4a07-a9f3-c6ea4560f214
idProduction: 20ef1afa-e86f-414d-bb40-f8f1490d531c
- path: user-transpiled-circuits
idStaging: 7e6b09d2-58d5-4892-9c70-4a4d662acd22
idProduction: 47dad7bd-4e08-4d22-a528-02d963df9e42
- path: vqe-with-estimator
idStaging: d1059d99-95c8-41e5-ba7c-9f0827d479ce
idProduction: 62a189e9-44cc-482b-90e8-30a479f23bac

0 comments on commit 46bfa84

Please sign in to comment.