Skip to content

Add simple dev site workflow #3

Add simple dev site workflow

Add simple dev site workflow #3

Workflow file for this run

name: Cobalt Documentation
on:
pull_request:
push:
branches:
- main
- feature/*
concurrency:
group: '${{ github.workflow }}-${{ github.event_name }} @ ${{ github.event.pull_request.number || github.sha }}'
cancel-in-progress: true
permissions: {}
jobs:
developer-docs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: kaidokert/[email protected]
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 --mount type=bind,source=$(pwd),target=/code docsite
shell: bash
- name: Markdown lint
uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8 # v16.0.0
with:
globs: 'cobalt/site/docs/**/*.md'
fix: true
- name: Add changes to git (again)
run: |
git diff
git add -A
git commit -m 'Documentation updates'
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 <[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 }}