See CONTRIBUTING.md.
$ script/compile
これは asciidoctor
を使って、HTMLファイルを gh-pages
ディレクトリに吐き出すものです。
aciidoctor
をインストールするには、ドキュメント ここを参照してください。
asciidoctorで作成したファイルはGithubで公開しています。これはこちらのように設定されています。
以下のすべてのコマンドは、すでにgitプロジェクトが初期化されていて、そのルートフォルダにいることを前提としています。
# Create an orphan branch named gh-pages
git checkout --orphan gh-pages
# Remove all files from staging
git rm -rf .
# Create an empty commit so that you will be able to push on the branch next
git commit --allow-empty -m "Init empty branch"
# Push the branch
git push origin gh-pages
ブランチが作成され、オリジンにプッシュされたので、ワークツリーを正しく設定しましょう。
# Come back to master
git checkout master
# Add gh-pages to .gitignore
echo "gh-pages/" >> .gitignore
git worktree add gh-pages gh-pages
以上で、通常通り npm run build でアプリをビルドできるようになりました。gh-pages フォルダに cd してみると、現在は gh-pages ブランチになっていて、ルートフォルダに戻ると master に戻っていることがわかります。
Github Pagesにデプロイするには。
cd gh-pages
git add .
git commit -m "update build"
git push
著作権 © 2020-2021 Michiel Borkent
Licensed under CC BY-SA 4.0を使用しています。