Skip to content

Commit 618a7f2

Browse files
committed
new workflow trial
1 parent e76b667 commit 618a7f2

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and deploy vim help
2+
3+
# This is an experimental.
4+
#
5+
# gh-pagesブランチを経由せず、actions/upload-pages-artifactを使って直接GitHub Pagesにデプロイする試み
6+
# pushのたびにいったん artifacts まで作る(HTML生成+Jekyll実行)
7+
# masterへのpushかcronでの実行であればGitHub Pagesへアップロードする
8+
# …という計画
9+
10+
on:
11+
push
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-24.04
16+
steps:
17+
- name: Setup Vim
18+
uses: thinca/action-setup-vim@v2
19+
with:
20+
vim_version: 'v9.1.0065'
21+
vim_type: 'Vim'
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
path: work
26+
- name: Generate new HTML documents
27+
run: |
28+
cd work
29+
make html
30+
cd ..
31+
mkdir target
32+
cp work/target/html/doc/*.html target
33+
- name: Check commit IDs
34+
id: commitid
35+
run: |
36+
echo "vim=$(git -C work/vim rev-parse HEAD)" >> $GITHUB_OUTPUT
37+
echo "vim_faq=$(git -C work/vim_faq rev-parse HEAD)" >> $GITHUB_OUTPUT
38+
39+
# TODO: Jekyllのビルド。必要なパーツをgh-pagesブランチから持ってくる必要あり
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: target
45+
46+
# TODO: masterへのpushもしくはcron実行のときだけ、GitHub Pagesへアップロードする

.github/workflows/generate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: |
4545
echo "vim=$(git -C work/vim rev-parse HEAD)" >> $GITHUB_OUTPUT
4646
echo "vim_faq=$(git -C work/vim_faq rev-parse HEAD)" >> $GITHUB_OUTPUT
47-
- name: Commit updated master branch
47+
- name: Commit updated gh-pages branch
4848
uses: EndBug/add-and-commit@v9
4949
with:
5050
cwd: './target'

0 commit comments

Comments
 (0)