Skip to content

Commit

Permalink
🚀 220620: 홈페이지 배포
Browse files Browse the repository at this point in the history
v1.0.0 홈페이지 배포
  • Loading branch information
HTMLhead committed Jun 20, 2022
2 parents cb952bf + 569ce80 commit 4cbd1ca
Show file tree
Hide file tree
Showing 857 changed files with 46,168 additions and 89,070 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @HTMLhead @dev-angelo
97 changes: 97 additions & 0 deletions .github/workflows/pipeline-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI/CD development

on:
push:
branches: [develop]

env:
CACHED_DEPENDENCY_PATHS: ./node_modules

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: develop

- uses: actions/setup-node@v2
with:
node-version: "14"

- name: Compute dependency cache key
id: compute_lockfile_hash
run: echo "::set-output name=hash::${{ hashFiles('package-lock.json') }}"

- name: Check dependency cache
uses: actions/cache@v2
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: develop-${{ steps.compute_lockfile_hash.outputs.hash }}

- name: Install dependencies if cache not exist
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: npm install

- name: Run test
run: npm run test

outputs:
dependency_cache_key: develop-${{ steps.compute_lockfile_hash.outputs.hash }}

staging-deploy:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
with:
ref: develop
fetch-depth: 0

- name: Check dependency cache
uses: actions/cache@v2
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.test.outputs.dependency_cache_key }}

- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Build gatsby application
run: npm run build
- name: Build storybook
run: npm run build-storybook

- name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: storybook-static
workingDir: ./

- name: Declare commit id use on s3 upload
id: vars
shell: bash
run: |
echo "GITHUB_SHA: ${GITHUB_SHA}"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: AWS S3 Deploy
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: beta.codesquad.kr
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "ap-northeast-2"
SOURCE_DIR: "./public"

- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,commit,message,author,action,ref
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
88 changes: 88 additions & 0 deletions .github/workflows/pipeline-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: CI/CD master

on:
push:
branches: [master]

env:
CACHED_DEPENDENCY_PATHS: ./node_modules

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master

- uses: actions/setup-node@v2
with:
node-version: "14"

- name: Compute dependency cache key
id: compute_lockfile_hash
run: echo "::set-output name=hash::${{ hashFiles('package-lock.json') }}"

- name: Check dependency cache
uses: actions/cache@v2
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: master-${{ steps.compute_lockfile_hash.outputs.hash }}

- name: Install dependencies if cache not exist
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: npm install

- name: Run test
run: npm run test

outputs:
dependency_cache_key: master-${{ steps.compute_lockfile_hash.outputs.hash }}

staging-deploy:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0

- name: Check dependency cache
uses: actions/cache@v2
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.test.outputs.dependency_cache_key }}

- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Build gatsby application
run: npm run build

- name: Declare commit id use on s3 upload
id: vars
shell: bash
run: |
echo "GITHUB_SHA: ${GITHUB_SHA}"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: AWS S3 Deploy
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: codesquad.kr
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "ap-northeast-2"
SOURCE_DIR: "./public"

- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,commit,message,author,action,ref
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
28 changes: 14 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
node_modules
.DS_Store
img/.DS_Store
img/about/.DS_Store
img/background/.DS_Store
img/company/.DS_Store
img/portfolio/.DS_Store
img/team/.DS_Store
vendor/.DS_Store
vendor/bootstrap/.DS_Store
vendor/font-awesome/.DS_Store
html/event/payment.html
.travis_beta.yml
.vscode
*.DS_Store

# history
.history/

# package
node_modules/

# gats-by
.cache/
public

# story-book
storybook-static
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"printWidth": 100,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"no-duplicate-variable": [true, "check-parameters"],
"no-var-keyword": true
}
13 changes: 13 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"storybook-addon-gatsby",
],
framework: "@storybook/react",
core: {
builder: "@storybook/builder-webpack5",
},
};
43 changes: 43 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { action } from "@storybook/addon-actions";
// GlobalTheme
import GlobalTheme from "../src/lib/context/GlobalTheme";
import GlobalHeader from "../src/lib/context/GlobalHeader";

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
layout: "fullscreen",
};

// Gatsby's Link overrides:
// Gatsby Link calls the `enqueue` & `hovering` methods on the global variable ___loader.
// This global object isn't set in storybook context, requiring you to override it to empty functions (no-op),
// so Gatsby Link doesn't throw errors.
global.___loader = {
enqueue: () => {},
hovering: () => {},
};

// This global variable prevents the "__BASE_PATH__ is not defined" error inside Storybook.
global.__BASE_PATH__ = "/";

// Navigating through a gatsby app using gatsby-link or any other gatsby component will use the `___navigate` method.
// In Storybook, it makes more sense to log an action than doing an actual navigate. Check out the actions addon docs for more info: https://storybook.js.org/docs/react/essentials/actions
window.___navigate = (pathname) => {
action("NavigateTo:")(pathname);
};

export const decorators = [
(Story) => (
<>
<GlobalTheme>
<Story />
</GlobalTheme>
</>
),
];
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

22 changes: 0 additions & 22 deletions LICENSE

This file was deleted.

Loading

0 comments on commit 4cbd1ca

Please sign in to comment.