Skip to content

ci: Github Action workflow define : push vimdoc-ja master & gh-pages #901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Generate vim help
on:
push:
branches:
- master

jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: checkout master
uses: actions/checkout@v2
with:
path: work
- name: Checkout vimdoc-ja
uses: actions/checkout@v2
with:
path: target
repository: 'vim-jp/vimdoc-ja'
token: ${{ secrets.VIMDOC_JA_TOKEN }}
- name: Setup Vim
uses: thinca/action-setup-vim@v1
with:
vim_version: 'v8.2.0020'
vim_type: 'Vim'
Comment on lines +21 to +25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これらの行は syntax-vim-ex にはありませんが、make内でvimを起動できています。
vimdoc-ja-working や vimdoc-en では必要な理由はなんでしょうか?
(できるだけ他(特に個人)への依存は減らしたいです)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

返事は4/23 19:00 +09:00ごろ

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あー、syntax-vim-exでのVimを見過していました
たしかにそうですね

https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md

記載がないからバージョン不明ですが、問題ないなら外しますね
確認するので少々おまちください。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認し、削除しました。

またあわせて微修正(記述など)を更新、PRのDescriptionも更新しています。

Copy link
Contributor Author

@tsuyoshicho tsuyoshicho Apr 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref vim-jp/vimdoc-en#17 (comment)

他の変更は維持しつつ、Vimのバージョンについては8.2系を使うように戻しました。

syntax-vim-exはTOHtmlは使わないので、そのままで大丈夫だと思います。(とりあえずは)

- name: Generate new document
run: |
cd work
# Create tags
vim -eu tools/maketags.vim

cd ..
# 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@v7
with:
cwd: './target'
author_name: '${{ github.actor }}'
author_email: '${{ github.actor }}@users.noreply.github.com'
message: |-
Generated by GitHub workflow ${{ github.run_id }}

https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
branch: master
pull_strategy: 'NO-PULL'
env:
GITHUB_TOKEN: ${{ secrets.VIMDOC_JA_TOKEN }}

deploy:
runs-on: ubuntu-latest
steps:
- name: checkout master
uses: actions/checkout@v2
with:
path: work
- name: Checkout vimdoc-ja
uses: actions/checkout@v2
with:
path: target
repository: 'vim-jp/vimdoc-ja'
token: ${{ secrets.VIMDOC_JA_TOKEN }}
ref: gh-pages
- name: Setup Vim
uses: thinca/action-setup-vim@v1
with:
vim_version: 'v8.2.0020'
vim_type: 'Vim'
- name: Generate new document
run: |
cd work
# Create html documents
make html

cd ..
# install
cp work/target/html/doc/*.html target
- name: Commit updated master branch
uses: EndBug/add-and-commit@v7
with:
cwd: './target'
author_name: '${{ github.actor }}'
author_email: '${{ github.actor }}@users.noreply.github.com'
message: |-
Generated by GitHub workflow ${{ github.run_id }}

https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
branch: gh-pages
pull_strategy: 'NO-PULL'
env:
GITHUB_TOKEN: ${{ secrets.VIMDOC_JA_TOKEN }}
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README-dist.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vimdoc-ja

[![Build Status](https://travis-ci.com/vim-jp/vimdoc-ja-working.svg?branch=master)](https://travis-ci.com/github/vim-jp/vimdoc-ja-working)
[![Generate vim help](https://github.com/vim-jp/vimdoc-ja-working/actions/workflows/generate.yml/badge.svg)](https://github.com/vim-jp/vimdoc-ja-working/actions/workflows/generate.yml)

日本語に翻訳した Vim 付属のヘルプを配布するためのプロジェクトです。

Expand Down
36 changes: 0 additions & 36 deletions tools/ci@vimdoc-ja.vim-jp.org.enc

This file was deleted.

27 changes: 0 additions & 27 deletions tools/deploy-gh-pages.sh

This file was deleted.

29 changes: 0 additions & 29 deletions tools/deploy-master.sh

This file was deleted.

13 changes: 0 additions & 13 deletions tools/install_sshkey_github.sh

This file was deleted.