Add simple dev site workflow #1
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
name: developer-docs | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- feature/* | |
concurrency: | |
group: '${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.pull_request.number || github.sha }}' | |
cancel-in-progress: true | |
permissions: {} | |
jobs: | |
python-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout | |
uses: kaidokert/checkout@v3.5.999 | |
with: | |
fetch-depth: 1 | |
persist-credentials: false | |
- name: Docker Build | |
run: docker build -t docsite --build-arg UID=$(id -u) --build-arg GID=$(id -g) cobalt/site/docker | |
shell: bash | |
- name: Docker Run | |
run: docker run -it --mount type=bind,source=$(pwd),target=/code docsite | |
shell: bash | |
- name: Add changes to git | |
run: git add -A | |
shell: bash | |
- name: Run pre-commit | |
uses: ./.github/actions/pre_commit | |
with: | |
base_ref: ${{ github.event.pull_request.base.sha || github.event.before }} | |
- name: Add changes to git (again) | |
run: git add -A | |
shell: bash | |
- name: Create Pull Request | |
id: create-pr | |
continue-on-error: true | |
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3 | |
with: | |
# token: ${{ secrets.CHERRY_PICK_TOKEN }} | |
base: ${{ github.base_ref }} | |
branch: ${{ github.head_ref || github.ref_name }} | |
committer: GitHub Release Automation <github@google.com> | |
title: "Documentation change for #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}" | |
body: | | |
Refer to the original PR: https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} | |
${{ github.event.pull_request.body }} |