Skip to content

Merge pull request #283 from remote-jp/dependabot/bundler/docs/nokogi… #157

Merge pull request #283 from remote-jp/dependabot/bundler/docs/nokogi…

Merge pull request #283 from remote-jp/dependabot/bundler/docs/nokogi… #157

Workflow file for this run

name: Test & Deploy
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: ☑️ Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: 💎 Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.7
- name: 🧪 Install gems
run: |
cd ./docs
bundle install
- name: 🔧 Build & Test
run: |
cd ./docs
JEKYLL_ENV=production bundle exec jekyll build
bundle exec rake upsert_data_by_readme
bundle exec rake test
- name: 🚀 Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
cd ./docs
if [ -n "$(git status en ja --porcelain)" ]; then
git config --global user.name "Yohei Yasukawa"
git config --global user.email "yohei@yasslab.jp"
git checkout main
git add en ja
git commit -m '🤖 Generate page(s) by README'
git push origin main
fi