Merge pull request #1801 from h-east/update-version9 #839
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 vim help | |
on: | |
push: | |
branches: | |
- master | |
concurrency: vimdoc-ja-deploy | |
# global concurrency limit access to vim-jp/vimdoc-ja per workflow | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialization | |
run: | | |
sudo apt-get update | |
# libfuse2 and LD_PRELOAD are needed for appimage. | |
sudo apt-get -y install libfuse2 | |
echo "LD_PRELOAD=/lib/x86_64-linux-gnu/libgmodule-2.0.so" >> $GITHUB_ENV | |
- name: checkout master | |
uses: actions/checkout@v4 | |
with: | |
path: work | |
- name: Checkout vimdoc-ja | |
uses: actions/checkout@v4 | |
with: | |
path: target | |
repository: 'vim-jp/vimdoc-ja' | |
ssh-key: ${{ secrets.VIMDOC_JA_SSH_KEY }} | |
- name: Setup Vim | |
uses: thinca/action-setup-vim@v2 | |
with: | |
vim_version: 'v9.1.0065' | |
vim_type: 'Vim' | |
- name: Generate new document | |
run: | | |
cd work | |
# Create tags | |
vim -eu tools/maketags.vim | |
cd .. | |
- name: Check commit ID | |
id: commitid | |
run: | | |
echo "id=$(git -C work rev-parse HEAD)" >> $GITHUB_OUTPUT | |
- name: Update target | |
run: | | |
cd target | |
# update latest | |
git pull --rebase | |
cd .. | |
- name: Install new document | |
run: | | |
# install | |
rsync -rlptD --delete-after work/doc/ target/doc | |
rsync -rlptD --delete-after work/syntax/ target/syntax | |
rsync -rlptD --delete-after work/README-dist.md target/README.md | |
- name: Commit updated master branch | |
uses: EndBug/add-and-commit@v9 | |
with: | |
cwd: './target' | |
default_author: github_actions | |
message: |- | |
Generated by GitHub workflow ${{ github.run_id }} | |
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
Used commit: | |
https://github.com/${{ github.repository }}/commit/${{ steps.commitid.outputs.id }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: generate | |
# "deploy" update vimdoc-ja/gh-pages branch | |
# work after "generate" to updated vimdoc-ja/master branch | |
# parallel work conflict vimdoc-ja repo status | |
steps: | |
- name: Initialization | |
run: | | |
sudo apt-get update | |
# libfuse2 and LD_PRELOAD are needed for appimage. | |
sudo apt-get -y install libfuse2 | |
echo "LD_PRELOAD=/lib/x86_64-linux-gnu/libgmodule-2.0.so" >> $GITHUB_ENV | |
- name: checkout master | |
uses: actions/checkout@v4 | |
with: | |
path: work | |
- name: Checkout vimdoc-ja | |
uses: actions/checkout@v4 | |
with: | |
path: target | |
repository: 'vim-jp/vimdoc-ja' | |
ssh-key: ${{ secrets.VIMDOC_JA_SSH_KEY }} | |
ref: gh-pages | |
- name: Setup Vim | |
uses: thinca/action-setup-vim@v2 | |
with: | |
vim_version: 'v9.1.0065' | |
vim_type: 'Vim' | |
- name: Generate new document | |
run: | | |
cd work | |
# Create html documents | |
make html | |
cd .. | |
- name: Check commit ID | |
id: commitid | |
run: | | |
echo "id=$(git -C work rev-parse HEAD)" >> $GITHUB_OUTPUT | |
- name: Update target | |
run: | | |
cd target | |
# update latest | |
git pull --rebase | |
cd .. | |
- name: Install new document | |
run: | | |
# install | |
cp work/target/html/doc/*.html target | |
- name: Commit updated master branch | |
uses: EndBug/add-and-commit@v9 | |
with: | |
cwd: './target' | |
default_author: github_actions | |
message: |- | |
Generated by GitHub workflow ${{ github.run_id }} | |
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
Used commit: | |
https://github.com/${{ github.repository }}/commit/${{ steps.commitid.outputs.id }} |