🐡
【覚書】JekyllなGitHubPagesのルートをdistにし、これが変更されるまでビルドさせない
- ブランチの
Settingsを開く。 - 左サイドバーから
Pagesを選ぶ。 -
Build and deploymentのSourceをGitHub Actions (Beta)にする。 -
GitHub Pages Jekyllが出てくるので、そのConfigureを押す。 -
jekyll-gh-pages.ymlを新規作成するエディタが開くので、以下のように変更。
on:
# Runs on pushes targeting the default branch
push:
+ paths:
+ - "dist/**"
branches: ["main"]
~~ 中略 ~~
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
- source: ./
+ source: ./dist
destination: ./_site
-
Start commitをクリック。 -
Commit direcrly to the main branch.にチェックが入っているのを確認。 -
Commit new fileをクリック。 - あとは、
distを変更して問題なく走るか確認すればおk
補足
docs にしたいなら、 dist と書いてるところ全部 docs に置き換えればおk
Discussion