Github Pagesにアップする方法(イマドキの)
最近は本当にGithub Pagesへのコンテンツ登録方法が楽ちんになってしまって本当助かります。 Actions使っての登録がすっごく楽。 早速コード このサイトでの登録方法はこんな感じになってます。 なお、事前に対応リポジトリの設定でGithub Pagesの有効化をしておきましょう。 ※ jekyllがカーリーブレス({..})を変に処理してしまうので、空白を入れています。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 name: Jekyllのフォーマット→公開 on: - push - workflow_dispatch jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: setup ruby uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 with: ruby-version: '3.1' - name: install dependencies run: cd blog; bundle install - name: build contents run: cd blog; jekyll build - name: fetch contents uses: actions/upload-pages-artifact@v1 with: path: blog/_site deploy: needs: build permissions: pages: write id-token: write environment: name: github-pages url: ${ { steps....