Skip to content

Commit

Permalink
[INFRA] Documentation preview
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Jul 18, 2024
1 parent 1e265ad commit f3195b5
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 84 deletions.
50 changes: 47 additions & 3 deletions .github/workflows/ci_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ on:
push:
branches:
- 'main'
pull_request:
pull_request_target:
types:
- unlabeled
- closed
workflow_dispatch:

concurrency:
Expand All @@ -29,11 +30,19 @@ jobs:
build:
name: Documentation
runs-on: ubuntu-latest
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
if: ( github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' ) && github.event.action != 'closed'
steps:
- name: Checkout
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v4

# pull_request_target does not checkout the merge commit by default
- name: Checkout
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.number }}/merge"

- name: Install Doxygen
uses: seqan/actions/setup-doxygen@main
with:
Expand All @@ -43,8 +52,43 @@ jobs:
run: |
mkdir build && cd build
cmake ../test/documentation
make download-cppreference-doxygen-web-tag
- name: Run tests
working-directory: build
run: ctest . -j --output-on-failure

- name: Deploy Preview
if: github.event_name == 'pull_request_target'
uses: seqan/actions/documentation_deploy_preview@main
with:
deploy_host: ${{ secrets.DEPLOY_HOST }}
deploy_user: ${{ secrets.DEPLOY_USER }}
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
deploy_base_path: ${{ secrets.DEPLOY_PREVIEW_BASE_PATH }}
source_path_user_doc: build/doc_usr/html
source_path_developer_doc: build/doc_dev/html
token: ${{ secrets.SEQAN_ACTIONS_PAT }}

- name: Deploy Documentation
if: github.event_name == 'push'
uses: seqan/actions/documentation_deploy_production@main
with:
deploy_host: ${{ secrets.DEPLOY_HOST }}
deploy_user: ${{ secrets.DEPLOY_USER }}
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
source_path_user_doc: build/doc_usr/html/
deploy_path_user_doc: ${{ secrets.DEPLOY_PRODUCTION_BASE_PATH }}/main_user
source_path_developer_doc: build/doc_dev/html/
deploy_path_developer_doc: ${{ secrets.DEPLOY_PRODUCTION_BASE_PATH }}/main_dev
delete:
name: Delete Preview
runs-on: ubuntu-latest
if: github.repository_owner == 'seqan' && github.event_name == 'pull_request_target' && github.event.action == 'closed'
steps:
- name: Delete Preview
uses: seqan/actions/documentation_delete_preview@main
with:
deploy_host: ${{ secrets.DEPLOY_HOST }}
deploy_user: ${{ secrets.DEPLOY_USER }}
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
deploy_base_path: ${{ secrets.DEPLOY_PREVIEW_BASE_PATH }}
81 changes: 0 additions & 81 deletions .github/workflows/deploy_documentation.yaml

This file was deleted.

0 comments on commit f3195b5

Please sign in to comment.