Skip to content

Commit

Permalink
[build] move document release to its own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jun 19, 2024
1 parent 6c0aaa4 commit e24844c
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 45 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/document-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Update Documentation

on:
workflow_dispatch:
inputs:
tag:
description: Release tag (e.g. selenium-4.22.0)
required: true
type: string

workflow_call:
inputs:
tag:
required: true
type: string

jobs:
update-documentation:
if: github.repository_owner == 'seleniumhq'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Checkout the tagged version
run: |
git fetch --tags
git checkout ${{ inputs.tag }}
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install specific version of DocFX tool
# Pinning to 2.75.3 to avoid breaking changes in newer versions
# See https://github.com/dotnet/docfx/issues/9855
run: dotnet tool install --global --version 2.75.3 docfx
- name: Install npm dependencies
run: |
npm install
npm install --prefix javascript/node/selenium-webdriver
- name: Update Documentation
run: ./go all: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.tag }}
base: gh-pages
title: Update documentation for ${{ inputs.tag }}
body: |
This PR updates the API documentation for all bindings
based on the latest released version
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: documentation
draft: false
48 changes: 3 additions & 45 deletions .github/workflows/stage-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,49 +61,7 @@ jobs:
files: build/dist/*.*

update-documentation:
runs-on: ubuntu-latest
needs: github-release
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Checkout the tagged version
run: |
git fetch --tags
git checkout selenium-${{ needs.github-release.outputs.version }}
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install specific version of DocFX tool
# Pinning to 2.75.3 to avoid breaking changes in newer versions
# See https://github.com/dotnet/docfx/issues/9855
run: dotnet tool install --global --version 2.75.3 docfx
- name: Install npm dependencies
run: |
npm install
npm install --prefix javascript/node/selenium-webdriver
- name: Update Documentation
run: ./go all: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-${{ needs.github-release.outputs.version }}
base: gh-pages
title: Update documentation for Selenium ${{ needs.github-release.outputs.version }}
body: |
This PR updates the api documentation for all bindings
based on the latest released version
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: documentation
draft: false
uses: ./.github/workflows/document-release.yml
with:
tag: selenium-${{ needs.github-release.outputs.version }}

0 comments on commit e24844c

Please sign in to comment.