Skip to content

support: try on stockfish #292

support: try on stockfish

support: try on stockfish #292

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
jobs:
Test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
services:
db:
image: postgres:11
ports: ["5432:5432"]
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: listudy_dev
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Cache mix modules
uses: actions/cache@v1
env:
cache-name: cache-mix-modules
with:
path: deps # mix cache files are stored in `deps` in the root of the project folder
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Setup elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: 1.11.2 # Define the elixir version [required]
otp-version: 23.0 # Define the OTP version [required]
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: "Install npm"
run: npm install --legacy-peer-deps --prefix assets
- name: Run Tests
run: |
mix compile
mix ecto.create
mix ecto.migrate
mix ecto.reset
mix test
mkdir -p priv/static/study_pgn
npm run deploy --prefix ./assets
mix phx.digest
Deploy:
name: Deploy
needs: Test
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd /opt/listudy
git pull
./scripts/prod/ci.sh