-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
299 additions
and
168 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
inputs: | ||
stage: | ||
description: 'Deployment stage' | ||
default: 'stage' | ||
ssh_private_key: | ||
description: 'Private SSH key' | ||
default: '' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install SSH key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ inputs.ssh_private_key }} | ||
- name: Install Ruby with Bundle to deploy via Capistrano | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.6' | ||
bundler-cache: true | ||
- name: Execute the deployment | ||
run: bundle exec cap ${{ inputs.stage }} deploy | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
name: Continuous Deployment | ||
on: [push] | ||
|
||
env: | ||
COMPOSE_DOCKER_CLI_BUILD: 1 | ||
DOCKER_BUILDKIT: 1 | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
if: | ||
contains(' | ||
refs/heads/master | ||
refs/heads/dev | ||
', github.ref) | ||
runs-on: ubuntu-latest | ||
env: | ||
PRIVATE_SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY }} | ||
steps: | ||
- name: Set deployment environment variables based on Git branches | ||
working-directory: ./ | ||
id: deploy_target | ||
run: | | ||
if [[ $GITHUB_REF == 'refs/heads/dev' ]]; then | ||
echo "::set-output name=DEPLOY_ENV::staging" | ||
fi | ||
if [[ $GITHUB_REF == 'refs/heads/master' ]]; then | ||
echo "::set-output name=DEPLOY_ENV::production" | ||
fi | ||
- uses: actions/[email protected] | ||
- name: Install SSH key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} | ||
- name: Install Ruby with Bundle to deploy via Capistrano | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.6' | ||
bundler-cache: true | ||
- name: Execute the deployment | ||
run: bundle exec cap ${{ steps.deploy_target.outputs.DEPLOY_ENV }} deploy | ||
deploy_prod: | ||
name: Deploy to Production | ||
environment: | ||
name: Production | ||
url: https://swissgames.garden | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
env: | ||
PRIVATE_SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/deploy | ||
with: | ||
stage: production | ||
ssh_private_key: ${{ secrets.PRIVATE_SSH_KEY }} | ||
|
||
deploy_staging: | ||
name: Deploy to Staging | ||
environment: | ||
name: Staging | ||
url: https://staging.swissgames.garden | ||
if: github.ref == 'refs/heads/dev' | ||
runs-on: ubuntu-latest | ||
env: | ||
PRIVATE_SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/deploy | ||
with: | ||
stage: staging | ||
ssh_private_key: ${{ secrets.PRIVATE_SSH_KEY }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# syntax=docker/dockerfile:1.3 | ||
|
||
FROM node:14-alpine | ||
|
||
# Create app directory | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.0 | ||
0.1.1 |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const GameInfo = ({title, children}) => | ||
const GameInfo = ({title, children, childrenClass}) => | ||
children ? ( | ||
<div> | ||
<h3 className="text-md font-light text-gray-500 mb-1">{title}</h3> | ||
<div className="text-lg">{children}</div> | ||
<div className={`text-lg ${childrenClass}`}>{children}</div> | ||
</div> | ||
) : null; | ||
|
||
GameInfo.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
children: PropTypes.node, | ||
childrenClass: PropTypes.string, | ||
}; | ||
|
||
export default GameInfo; |
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
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
Oops, something went wrong.