-
-
Notifications
You must be signed in to change notification settings - Fork 88
43 lines (41 loc) · 1.2 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 }}