Empty commit to change stack: heroku-22 -> heroku-24 #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-22.04 | |
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 with 'actions' group" | |
run: | | |
bundle config set with 'actions' | |
bundle config set path 'vendor/bundle' | |
bundle install --jobs 4 --retry 3 | |
- name: 🔧 Test building | |
run: | | |
bundle exec rake assets:precompile | |
bundle exec rake test SKIP_BUILD=true | |
bundle exec rspec spec/qiita.rb | |
# - name: ⏱ Test tasks | |
# if: ${{ github.actor }} != *'dependabot'* | |
# run: | | |
# bundle exec rake share_calendar_events:test | |
# env: | |
# GOOGLE_CALENDAR_IDS: ${{ secrets.GOOGLE_CALENDAR_IDS }} | |
# GOOGLE_SECRETS: ${{ secrets.GOOGLE_SECRETS }} | |
# GOOGLE_TOKENS: ${{ secrets.GOOGLE_TOKENS }} | |
deploy: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
needs: test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: ☑️ Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: 🚀 Deploy to Heroku | |
uses: akhileshns/heroku-deploy@v3.13.15 | |
with: | |
branch: 'main' | |
usedocker: false | |
heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | |
heroku_app_name: 'yasslab-jp' | |
heroku_email: 'yohei@yasslab.jp' | |
healthcheck: 'https://yasslab.jp/health' | |
rollbackonhealthcheckfailed: true |