Skip to content

Merge pull request #294 from caddijp/feature/caddijp #186

Merge pull request #294 from caddijp/feature/caddijp

Merge pull request #294 from caddijp/feature/caddijp #186

Workflow file for this run

name: Test & Deploy
on:
push:
branches:
- main
pull_request:
branches:
- "*"
# Allows you to run this workflow manually from the Actions tab
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
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
- 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