Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4 Configure deployment automation #32

Merged
merged 15 commits into from Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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'
junan marked this conversation as resolved.
Show resolved Hide resolved

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.