Skip to content
Open
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
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Re:VIEWファイルからPDFをビルドしてArtifactsとして保存できま

このReVIEW-build-artifact-actionと[ReVIEW-Template](https://github.com/TechBooster/ReVIEW-Template)を使えば、簡単にRe:VIEWをビルドできるようになっています。もちろんRe:VIEWビルドができるリポジトリであればテンプレートを使っていなくても成果物を生成でき、PDFがダウンロードできます。

開発途中であるため、PDF/EPUB/HTMLのうち**PDF**での出力のみ対応しています。

<動作イメージ図>

## 利用方法
Expand Down Expand Up @@ -61,10 +59,10 @@ TODO

### 設定できるパラメータ

設定できるパラメータは次の3つで、いずれも省略可能です(必須ではありません)。現時点では `target_dir` 以外のパラメータをサポートしていません。
設定できるパラメータは次の3つで、いずれも省略可能です(必須ではありません)。

| パラメータ | 説明 | 利用例 |
| :---- | :---- | :---- |
| `target_dir` | ビルド対象があるディレクトリ(未指定の場合は `./` を利用する) | あとで書く |
| `config_file` | Configファイル名を指定する(未指定の場合は `config.yml` を利用する) | 未サポート。今後実装されます |
| `format` | 出力フォーマットを(PDF,EPUB,HTML)から指定 | 未サポート。今後実装されます |
| `config_file` | Configファイル名を指定する(未指定の場合は `config.yml` を利用する) | `with:`<br>&nbsp;&nbsp;`config_file: config-ebook.yml` |
| `format` | 出力フォーマットを(pdf,epub,html)から指定 | `with:`<br>&nbsp;&nbsp;`format: epub` |
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ inputs:
required: false
default: config.yml
format:
description: Output file format. Please choose from PDF, EPUB, HTML.
description: Output file format. Please choose from pdf, epub, html.
required: false
default: PDF
default: pdf

runs:
using: docker
Expand Down
4 changes: 1 addition & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
[ -z "${INPUT_CONFIG_FILE}" ] && { echo "Need to set CONFIG_FILE. Default is 'config.yml'"; exit 1; }
[ -z "${INPUT_FORMAT}" ] && { echo "Need to set INPUT_FORMAT. Default is 'PDF'"; exit 1; }

# TODO Enable env paramaters that only INPUT_TARGET_DIR works well.

echo "Run Initialization and build step"
cd $INPUT_TARGET_DIR && bundle install && npm install && npm run pdf
cd "$INPUT_TARGET_DIR" && bundle install && npm install && REVIEW_CONFIG_FILE="$INPUT_CONFIG_FILE" npm run "$INPUT_FORMAT"
echo "Finish build step"