name: actions
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - "*"
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6
          bundler-cache: true
      - name: run spec
        run: bundle exec rake test
  deploy:
    if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6
          bundler-cache: true
      - name: deploy
        run: bash ./bin/deploy.sh
        env:
          SACLOUD_ACCESS_TOKEN: ${{ secrets.SACLOUD_ACCESS_TOKEN }}
          SACLOUD_ACCESS_TOKEN_SECRET: ${{ secrets.SACLOUD_ACCESS_TOKEN_SECRET }}

name: actions
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - "*"
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6
          bundler-cache: true
      - name: run spec
        run: bundle exec rake test

  deploy:
    if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6
          bundler-cache: true
      - name: deploy
        run: bash ./bin/deploy.sh
        env:
          SACLOUD_ACCESS_TOKEN: ${{ secrets.SACLOUD_ACCESS_TOKEN }}
          SACLOUD_ACCESS_TOKEN_SECRET: ${{ secrets.SACLOUD_ACCESS_TOKEN_SECRET }}

Add indent for better code reading
Add indent for better code reading
