Skip to content

create documentation PR #67

create documentation PR

create documentation PR #67

name: create documentation PR
on:
workflow_dispatch:
inputs:
version_tag:
description: |
The branch or tag name when generaing the QMDs. Also used for the name of the PR.
The name of the current branch or tag is used by default
type: string
push:
tags:
- '*'
jobs:
push_documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: openpipelines
- uses: actions/checkout@v4
with:
repository: openpipelines-bio/website
path: website
token: ${{ secrets.GTHB_PAT }}
- uses: viash-io/viash-actions/setup@v6
- name: Get tag to use
id: get_tag
run: |
INPUT_TAG="${{ github.event.inputs.version_tag }}"
TAG_OR_BRANCH_NAME=${INPUT_TAG:-"${{ github.ref_name }}"}
echo "tag=$TAG_OR_BRANCH_NAME" >> $GITHUB_OUTPUT
- uses: viash-io/viash-actions/pro/generate-documentation-qmd@v6
with:
project_directory: openpipelines
src: ./
query: '^(?!workflows)'
output_dir: ../website/components/modules/
dest_path: "{namespace}/{name}.qmd"
viash_pro_token: ${{ secrets.GTHB_PAT }}
tools_version: main_build
ref: "${{ steps.get_tag.outputs.tag }}"
- uses: viash-io/viash-actions/pro/generate-documentation-qmd@v6
with:
project_directory: openpipelines
src: ./
query: '^workflows'
output_dir: ../website/components/workflows/
dest_path: "{namespace}/{name}.qmd"
viash_pro_token: ${{ secrets.GTHB_PAT }}
tools_version: main_build
ref: "${{ steps.get_tag.outputs.tag }}"
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GTHB_PAT }}
working-directory: website
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git checkout -B "release-${{ steps.get_tag.outputs.tag }}"
git commit -m "OpenPipelines release ${{ steps.get_tag.outputs.tag }}"
git push --set-upstream origin "release-${{ steps.get_tag.outputs.tag }}"
gh pr create --title "Openpipeline release ${{ steps.get_tag.outputs.tag }}" --base main --head "release-${{ steps.get_tag.outputs.tag }}" --body ""