Skip to content

Commit

Permalink
Merge pull request #32 from malparty/chore/setup-deployment
Browse files Browse the repository at this point in the history
#4 Configure deployment automation
  • Loading branch information
malparty committed Jun 10, 2021
2 parents 7043772 + b010fbd commit 98a6af2
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy_heroku.yml
Expand Up @@ -7,15 +7,15 @@ on:
branches:
- master
- main
- development
- develop
types:
- completed
workflow_dispatch:

env:
DOCKER_REGISTRY_HOST: ${{ secrets.DOCKER_REGISTRY_HOST }}
DOCKER_REGISTRY_USERNAME: ${{ github.repository_owner }}
DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
DOCKER_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_IMAGE: ${{ github.repository }}
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

Expand All @@ -42,9 +42,9 @@ jobs:
run: |
if [[ $BRANCH_TAG = "latest" ]]
then
echo "HEROKU_APP=google_search_ruby" >> $GITHUB_ENV
echo "HEROKU_APP=google-search-ruby" >> $GITHUB_ENV
else
echo "HEROKU_APP=google_search_ruby-staging" >> $GITHUB_ENV
echo "HEROKU_APP=google-search-ruby-staging" >> $GITHUB_ENV
fi
- name: Login to Docker registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_production_build.yml
Expand Up @@ -5,7 +5,7 @@ on:
branches-ignore:
- master
- main
- development
- develop

env:
DOCKER_REGISTRY_HOST: ${{ secrets.DOCKER_REGISTRY_HOST }}
Expand Down
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -4,6 +4,12 @@
> Google Search Ruby is a Web app that extract large amounts of data from the Google search results page.
> Feed it with a CSV File containing your keywords, and the app will do the rest for you!
## Web Application

[Staging](https://google-search-ruby-staging.herokuapp.com/)

[Production](https://google-search-ruby.herokuapp.com/)

## Project Setup

### Prerequisites
Expand Down Expand Up @@ -114,3 +120,11 @@ rspec [rspec-params]

- Create a [Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
from bot account with `public_repo` scope, and set it as `DANGER_GITHUB_API_TOKEN` secret on the CI Environment Settings.


## About
![Nimble](https://assets.nimblehq.co/logo/dark/logo-dark-text-160.png)

This project is created to complete **Web Certification Path** using **Ruby** at [Nimble][nimble]

[nimble]: https://nimblehq.co
5 changes: 5 additions & 0 deletions app/controllers/keywords_controller.rb
@@ -0,0 +1,5 @@
# frozen_string_literal: true

class KeywordsController < ApplicationController
def index; end
end
2 changes: 2 additions & 0 deletions app/views/keywords/index.html.erb
@@ -0,0 +1,2 @@
<h1>Keywords#index</h1>
<p>Find me in app/views/keyword/index.html.erb</p>
1 change: 1 addition & 0 deletions config/database.yml
Expand Up @@ -18,4 +18,5 @@ test:
database: <%= ENV['DB_NAME'] %>_test

production:
<<: *default
url: <%= ENV['DATABASE_URL'] %>
3 changes: 3 additions & 0 deletions config/routes.rb
@@ -1,3 +1,6 @@
Rails.application.routes.draw do
root to: 'keywords#index'

resources :keywords, only: :index
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
Empty file added spec/helpers/.keep
Empty file.
Empty file added spec/views/.keep
Empty file.

0 comments on commit 98a6af2

Please sign in to comment.