Regenerate Qiskit 1.0 docs to use precise source code links #3272
Workflow file for this run
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 code is a Qiskit project. | |
# | |
# (C) Copyright IBM 2023. | |
# | |
# This code is licensed under the Apache License, Version 2.0. You may | |
# obtain a copy of this license in the LICENSE 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. | |
# This Action builds the docs in pull requests so that we can view a live preview. | |
# It uses IBM Cloud to build the Dockerfile at the root of the repository. | |
# | |
# Due to security, this can only run on branches of qiskit/docs, i.e. not on forks. | |
# We skip the actions if running on a fork. | |
name: Preview | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize, closed] | |
paths: | |
- "docs/**/*" | |
- "public/images/**/*" | |
jobs: | |
setup: | |
if: | | |
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize') && | |
github.event.pull_request.head.repo.full_name == github.repository | |
uses: ./.github/workflows/deploy-code-engine.yml | |
with: | |
env_name: Preview | |
secrets: | |
ibmcloud_account: ${{ secrets.IBMCLOUD_ACCOUNT }} | |
ibmcloud_api_key: ${{ secrets.IBMCLOUD_API_KEY }} | |
teardown: | |
if: | | |
github.event.action == 'closed' && | |
github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/set-up-ibm-cloud | |
id: set-up-cloud | |
with: | |
env_name: Preview | |
ibmcloud_account: ${{ secrets.IBMCLOUD_ACCOUNT }} | |
ibmcloud_api_key: ${{ secrets.IBMCLOUD_API_KEY }} | |
- name: Remove Code Engine preview application | |
run: | | |
ibmcloud ce project select -n qiskit-docs-preview | |
ibmcloud ce application delete \ | |
--name "${{ steps.set-up-cloud.outputs.app_name }}" \ | |
--wait \ | |
--ignore-not-found \ | |
--force |