Skip to content

Commit

Permalink
Create documentation.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
oxve authored Jun 13, 2024
1 parent efe21b3 commit 09eaa0d
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Cobalt Documentation

on:
pull_request:
push:
branches:
- main
- 25.lts.1+

concurrency:
group: '${{ github.workflow }}-${{ github.event_name }} @ ${{ github.event.pull_request.number || github.sha }}'
cancel-in-progress: true

permissions: {}

jobs:
developer-docs:
name: Generate Docs
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: kaidokert/[email protected]
with:
ref: ${{ github.base_ref }}
fetch-depth: 0
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 --mount type=bind,source=$(pwd),target=/code docsite
shell: bash
- name: Stage files for pre-commit
run: git add -A
shell: bash

# TODO: REMOVE
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Pip Packages
shell: bash
run: pip install --require-hashes --no-deps -r ${GITHUB_WORKSPACE}/precommit_hooks/requirements.txt



- name: Run pre-commit
uses: ./.github/actions/pre_commit
with:
base_ref: ${{ github.event.pull_request.base.sha || github.event.before }}

- name: Git diff (DEBUG)
run: |
git reset
git diff
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: doc-${{ github.event.pull_request.number }}
committer: GitHub Release Automation <[email protected]>
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 }}

0 comments on commit 09eaa0d

Please sign in to comment.