🤖 サーバー初期化依頼などの自動化に向けた各種タスク管理システムの設計と実装 #178
Workflow file for this run
This file contains hidden or 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: actions | |
on: | |
push: | |
branches: | |
- master | |
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: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
#ruby-version: 2.7 # Not necessary if `.ruby-version` is given | |
- name: Run bundle exec rake test | |
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@v3 | |
with: | |
fetch-depth: 2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
#ruby-version: 2.7 # Not necessary if `.ruby-version` is given | |
- name: deploy | |
run: bash ./bin/deploy.sh | |
env: | |
SACLOUD_ACCESS_TOKEN: ${{ secrets.SACLOUD_ACCESS_TOKEN }} | |
SACLOUD_ACCESS_TOKEN_SECRET: ${{ secrets.SACLOUD_ACCESS_TOKEN_SECRET }} |