Skip to content

add www

add www #263

Workflow file for this run

name: deploy
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: shlinkedin
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
MIX_ENV: test
GIPHY_API_KEY: ${{ secrets.GIPHY_API_KEY }}
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: 22.2.6
elixir-version: 1.12.3
- uses: actions/cache@v1
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- uses: actions/setup-node@v1
with:
node-version: "12.18.3"
- uses: nanasess/setup-chromedriver@master
with:
chromedriver-version: "79.0.3945.36"
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
- run: mix local.rebar --force
- run: mix local.hex --force
- run: mix deps.get
- run: npm install --prefix assets
- run: npm run deploy --prefix assets
- run: mix test --exclude gif_test
deploy-app:
needs: test # Will only run if the test job succeeds
if: github.ref == 'refs/heads/main' # Only run this job if it is on the main branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main # Check out main instead of the latest commit
fetch-depth: 0 # Checkout the whole branch
- uses: actions/setup-python@v2
with:
python-version: 3.8.1
- uses: mhanberg/[email protected]
with:
GIGALIXIR_APP: shlinkedin
GIGALIXIR_USERNAME: ${{ secrets.GIGALIXIR_USERNAME }}
GIGALIXIR_PASSWORD: ${{ secrets.GIGALIXIR_PASSWORD }}
MIGRATIONS: true # defaults to true
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}