Skip to content

Commit

Permalink
Merge pull request #18 from kode-krew/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
youngxdev authored May 15, 2024
2 parents e99847b + 2ea1465 commit d69df12
Show file tree
Hide file tree
Showing 84 changed files with 28,686 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {},
};
42 changes: 42 additions & 0 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: main-deploy

on:
push:
branches:
- main
workflow_dispatch:

jobs:
# 빌드
build:
runs-on: ubuntu-latest
steps:
- name: Get Github Actions IP
id: ip
uses: haythem/[email protected]

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2

- name: Add Github Actions IP to Security group
run: |
aws ec2 authorize-security-group-ingress --group-id ${{ secrets.AWS_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32
- name: create pem key
run: |
echo "$SSH_KEY" >> key.pem
chmod 600 key.pem
ssh -i key.pem -o StrictHostKeyChecking=no ${USER}@${HOST} "bash git-action.sh"
env:
USER: ${{secrets.USER}}
HOST: ${{secrets.HOST}}
SSH_KEY: ${{secrets.SSH_KEY}}

- name: Remove Github Actions IP From Security Group
run: |
aws ec2 revoke-security-group-ingress --group-id ${{ secrets.AWS_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32
Loading

0 comments on commit d69df12

Please sign in to comment.