Merge pull request #1084 from fukamachi/fix/window-has-following-lines-p #385
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: Generate document | |
on: | |
push: | |
branches: [ 'main' ] | |
workflow_dispatch: | |
branches: [ '*' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Roswell | |
env: | |
LISP: ${{ matrix.lisp }} | |
run: | | |
curl -L https://raw.githubusercontent.com/roswell/roswell/v22.12.14.113/scripts/install-for-ci.sh | sh | |
- name: Generate document and create pull request | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
set -ex | |
# workaround for sbcl and log4cl combination problems | |
mkdir ~/common-lisp | |
cd ~/common-lisp | |
git clone https://github.com/sharplispers/log4cl.git | |
cd - | |
ros config set dynamic-space-size 2048 | |
ros install lem-project/async-process lem | |
export PATH=$HOME/.roswell/bin:$PATH | |
cd $(ros -e '(princ (ql:where-is-system :lem))') | |
document_file=docs/default-keybindings.md | |
ros -s lem -s lem/extensions -e "(lem-documentation-mode:generate-markdown-file \"${document_file}\" :command)" | |
if [ -z "$(git diff ${document_file})" ]; then | |
exit 0 | |
fi | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
branch_name="update-docs-$(date '+%Y%m%d-%H%M%S')" | |
git checkout -b $branch_name | |
git add ${document_file} | |
git commit -m "update ${document_file}" | |
git push origin $branch_name | |
gh pr create -B main -t "update ${document_file} $(date '+%Y%m%d-%H%M%S')" -b '' |