Appearance
Use GitHub Workflows to deploy to Kipu Quantum Hub
To setup a deploy job in a GitHub workflow you can use the GitHub Action to update your service on the platform. It is an easy to use wrapper around the CLI, which ultimately updates your service.
To setup the workflow for a new service proceed with the general setup of your git repo on GitHub, such that you have wired your service code with a service referenced in the planqk.json.
Then create a CICD-pipeline that deploys service updates on the platform whenever you create new releases on GitHub via the following steps that must be executed in the root your local clone of your GitHub repository:
- Create the folder structure
.github/workflowsin the root of your repository viamkdir -p .github/workflows - Create file
CD.ymlspecifying the github workflow viatouch .github/workflows/CD.yml - Paste the following snippet into
CD.ymland save the fileyamlname: CD # Controls when the workflow will run on: # Triggers the workflow on new releases release: types: [ released ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: # This workflow contains a single job called "deploy" deploy: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 # Updates your service on the platform - uses: PlanQK/update-service-action@v1 with: PLANQK_TOKEN: ${{ secrets.PLANQK_TOKEN }} CONTEXT_ID: ${{ secrets.CONTEXT_ID }} - Commit and push these changes to your remote via
git add . && git commit -m "add CD workflow" && git push
The action PlanQK/update-service-action@v1 requires PLANQK_TOKEN and CONTEXT_ID as inputs, which you have to setup as Repository Secretes of your repository on GitHub. If you have setup the repository correctly, you will find a workflow called CD when navigating to the Actions of your GitHub repository. You can trigger the automatic deployment of service updates either manually or by creating releases from your codebase.

