WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Automating regeneration of Info file #379

@jvdydev

Description

@jvdydev

From time to time, we get merge conflicts because two PRs change documentation, which results in both regenerating the info file (thus leading to a merge issue).
It also has happened that regeneration was forgotten.

Therefor, we want to move the building of the info file into CI.
I threw together a small workflow, however I first want to give anyone interested the chance to discuss (improvements, optimizations, ...).

The current workflow (branch set to craftedv2RC1, eventually this would become master):

name: regenerate-info

on:
  pull_request:
    types:
      - closed
    paths:
      - docs/*.org
    branches:
      - craftedv2RC1

jobs:
  regenerate-info:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest

    permissions:
      contents: write

    steps:
    - uses: actions/checkout@v3
      with:
        ref: ${{ github.head_ref }}

    - name: Install Emacs
      uses: purcell/setup-emacs@master
      with:
        version: 29.1

    - name: Generate info
      working-directory: ./docs
      run: make

    - uses: stefanzweifel/git-auto-commit-action@v4
      with:
        commit_message: Regenerate info file

This would rebuild the info file if any org file in the docs directory changed.
The newly built info file would then be committed by the last committer (co-authored by gihub-actions bot).

Discussion welcome 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionDiscuss things, make decisionsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions