Configure tailwind and basic home page #20
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
backend: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: backend | |
services: | |
postgres: | |
image: postgres:10.8 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: "postgres" | |
POSTGRES_DB: recipes_test | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
# tmpfs makes DB faster by using RAM | |
options: >- | |
--mount type=tmpfs,destination=/var/lib/postgresql/data | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | |
- name: Install dependencies | |
run: bundle install | |
- name: Rubocop | |
run: bundle exec rubocop | |
- name: Run tests | |
run: bin/rails t | |
deploy: | |
name: Deploy application | |
runs-on: ubuntu-latest | |
needs: backend | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |