name: Create search index

on:
  push:
    branches:
      - master

jobs:
  jekyll:
    runs-on: ubuntu-latest
    environment: jekyll
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          working-directory: docs
          bundler-cache: true
      - name: Index changed posts
        env:
          ELASTICSEARCH_URL: ${{ secrets.ELASTICSEARCH_URL }}
          ELASTICSEARCH_ACCESS_TOKEN: ${{ secrets.ELASTICSEARCH_ACCESS_TOKEN }}
        working-directory: docs
        run: |
          git diff --name-only HEAD~1..HEAD > changes.txt
          git diff --name-only HEAD..HEAD~1 >> changes.txt
          bundle exec jekyll build

name: Create search index

on:
  push:
    branches:
      - master

jobs:
  jekyll:
    runs-on: ubuntu-latest
    environment: jekyll
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          working-directory: docs
          bundler-cache: true
      - name: Index changed posts
        env:
          ELASTICSEARCH_URL: ${{ secrets.ELASTICSEARCH_URL }}
          ELASTICSEARCH_ACCESS_TOKEN: ${{ secrets.ELASTICSEARCH_ACCESS_TOKEN }}
        working-directory: docs
        run: |
          git diff --name-only HEAD~1..HEAD > changes.txt
          git diff --name-only HEAD..HEAD~1 >> changes.txt
          bundle exec jekyll build
      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./docs/_site

Add deployment to GitHub Pages
Add deployment to GitHub Pages
