Update Documentation #34
This file contains hidden or 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
name: Update Documentation | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Release version (e.g., 4.21.0) | |
required: true | |
type: string | |
language: | |
description: language documentation | |
required: true | |
type: choice | |
default: "all" | |
options: | |
- java | |
- rb | |
- py | |
- dotnet | |
- node | |
- all | |
workflow_call: | |
inputs: | |
version: | |
required: true | |
type: string | |
sha: | |
required: true | |
type: string | |
language: | |
required: false | |
type: string | |
default: "all" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || inputs.sha }} | |
- name: Fetch gh-pages branch | |
run: git fetch origin gh-pages | |
- name: Setup git | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Selenium CI Bot" | |
- name: Setup curl for Ubuntu | |
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Set up Python 3.9 | |
if: ${{ inputs.language == 'all' || inputs.language == 'py' }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
if: ${{ inputs.language == 'all' || inputs.language == 'py' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: Install npm dependencies | |
if: ${{ inputs.language == 'all' || inputs.language == 'node' }} | |
run: | | |
npm install | |
npm install --prefix javascript/node/selenium-webdriver | |
- name: Update Documentation | |
run: ./go ${{ inputs.language }}:docs | |
- name: Documentation Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.SELENIUM_CI_TOKEN }} | |
author: Selenium CI Bot <[email protected]> | |
delete-branch: true | |
branch: api-docs-${{ inputs.version }}-${{ inputs.language }} | |
base: gh-pages | |
title: Update documentation for Selenium ${{ inputs.version }} (${{ inputs.language }}) | |
body: | | |
This PR updates the API documentation for **${{ inputs.language }}** language bindings to version **${{ inputs.version }}**. | |
- Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: documentation | |
draft: false |