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

๐Ÿ”ง Setting : Github Action ์ด์šฉํ•œ ๋ฐฐํฌ #65

Merged
merged 9 commits into from
Jul 5, 2023

Conversation

guesung
Copy link
Member

@guesung guesung commented Jul 5, 2023

๐Ÿ’ก ์™œ PR์„ ์˜ฌ๋ ธ๋‚˜์š”?

  • ์‹ ๊ทœ ํ”ผ์ฒ˜

๐Ÿ’ ๋ฌด์—‡์ด ์–ด๋–ป๊ฒŒ ๋ฐ”๋€Œ๋‚˜์š”?

  1. Vercel์„ ํŒ€์œผ๋กœ ์ด์šฉ ์‹œ ๋น„์šฉ์ด ๋ฐœ์ƒํ•˜์—ฌ, Vercel์„ ๊ฐœ์ธrepository์—์„œ ๋ฐฐํฌ๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ณ , ํŒ€์—์„œ ๋ณ€ํ™”๊ฐ€ ์ƒ๊ธธ ๊ฒฝ์šฐ ๊ฐœ์ธ repository์—์„œ ๋ณ€ํ™”๋œ ๋‚ด์šฉ์„ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ์‹์œผ๋กœ ๊ตฌํ˜„ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
    • ์‚ฌ์‹ค, ํŒ€์œผ๋กœ ์ด์šฉ ํ›„ ํŒ€ ๊ธฐํš์ž๋‹˜์—๊ฒŒ ๋น„์šฉ์„ ์ฒญ๊ตฌํ•˜๋ฉด ๊ฐ€๋Šฅํ•œ ๋ถ€๋ถ„์ด๋‚˜, ์žฅ๊ธฐ์ ์œผ๋กœ ๋ณด์•˜์„ ๋•Œ ๋ฌด๋ฃŒ๋กœ ์ด์šฉํ•˜๋ฉด ๋” ์ข‹๊ฒ ๋‹ค ์‹ถ์–ด์„œ ์ด ๋ฐฉ๋ฒ•์„ ์ฑ„ํƒํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ์•„๋ฌด๋ž˜๋„ ๊ผผ์ˆ˜๋ฅผ ์ด์šฉํ•œ ์ ์ ˆํ•˜์ง€ ์•Š์€ ๋ฐฉ์‹์ด๊ธฐ์—, Vercel๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ฐฐํฌ ํ›„ ์•ˆ์ •ํ™”๊ฐ€ ๋˜๋ฉด ์ถ”ํ›„์— AWS๋กœ ์ด์ „๊ณ„ํš์ด ์žˆ์Šต๋‹ˆ๋‹ค.
  2. auto-publishing.yml์„ ์ถ”๊ฐ€ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
# .github / workflows / auto-publishing.yml
name: git push into another repo to deploy to vercel

on:
  push:
    branches:
      - 'develop'

jobs:
  build:
    runs-on: ubuntu-latest
    container: pandoc/latex
    steps:
      - uses: actions/checkout@v2
      - name: Install mustache (to update the date)
        run: apk add ruby && gem install mustache
      - name: creates output
        run: sh ./build.sh
      - name: Pushes to another repository
        id: push_directory
        uses: cpina/github-action-push-to-another-repository@main
        env:
          API_TOKEN_GITHUB: ${{ secrets.PERSONAL_TOKEN }}
        with:
          source-directory: 'output'
          destination-github-username: guesung
          destination-repository-name: gloddy-client-publishing
          user-email: gueit214@naver.com
          target-branch: develop
      - name: Test get variable exported by push-to-another-repository
        run: echo $DESTINATION_CLONED_DIRECTORY
// build.sh
#!/bin/sh
cd ../
mkdir output
cp -R ./gloddy-client/* ./output
cp -R ./output ./gloddy-client/
  1. auto-publishing-devleop๊ณผ auto-publish-feature๋ฅผ ๊ตฌ๋ถ„ํ•˜์—ฌ, develop์— merge๋  ๊ฒฝ์šฐ production์—, ๊ทธ ์ด์ „์—๋Š” develop์— ๋ฐฐํฌ๊ฐ€ ๋˜๋„๋ก ๊ตฌํ˜„ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
  2. ๋กœ์ง์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.
    1. feature/~ branch์— Pull Request ํ˜น์€ develop branch์— merge
    2. Github Action์œผ๋กœ ์ธํ•ด guesung/gloddy-client-publishing์œผ๋กœ push
    3. ์œ„ Repository์— ์—ฐ๊ฒฐํ•ด๋‘” Vercel ์„ค์ •์„ ํ†ตํ•ด ์ž๋™ ๋ฐฐํฌ
      • feature์—์„œ ์˜ฌ๋ฆฐ PR์˜ ๊ฒฝ์šฐ development๋ฐฐํฌ
      • develop์— merge๋œ ๊ฒฝ์šฐ production๋ฐฐํฌ

๐Ÿ’ฌ ๋ฆฌ๋ทฐ์–ด๋ถ„๋“ค๊ป˜

@github-actions github-actions bot added ๐Ÿž Bug Test ํ…Œ์ŠคํŠธ ์ค‘์ธ ๊ฒฝ์šฐ labels Jul 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Labeler๊ฐ€ ์ œ๋ชฉ๊ณผ ์„ค๋ช…์— ์žˆ๋Š” ํŠน๋ณ„ํ•œ ํ…์ŠคํŠธ์™€ ์ผ์น˜ํ•˜๋Š” ๋ ˆ์ด๋ธ”์„ ์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.
Label์„ ๊ฒ€ํ† ํ•˜๊ณ  ํ•„์š”ํ•œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ ์šฉํ•ด ์ฃผ์„ธ์š”.

@guesung guesung closed this Jul 5, 2023
@guesung guesung reopened this Jul 5, 2023
@guesung guesung closed this Jul 5, 2023
@guesung guesung reopened this Jul 5, 2023
@guesung guesung closed this Jul 5, 2023
@guesung guesung reopened this Jul 5, 2023
@guesung guesung closed this Jul 5, 2023
@guesung guesung reopened this Jul 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Labeler๊ฐ€ ์ œ๋ชฉ๊ณผ ์„ค๋ช…์— ์žˆ๋Š” ํŠน๋ณ„ํ•œ ํ…์ŠคํŠธ์™€ ์ผ์น˜ํ•˜๋Š” ๋ ˆ์ด๋ธ”์„ ์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.
Label์„ ๊ฒ€ํ† ํ•˜๊ณ  ํ•„์š”ํ•œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ ์šฉํ•ด ์ฃผ์„ธ์š”.

@guesung guesung closed this Jul 5, 2023
@guesung guesung reopened this Jul 5, 2023
@guesung guesung merged commit 5fa020b into develop Jul 5, 2023
1 of 2 checks passed
@guesung guesung deleted the feature/auto-publishing branch July 5, 2023 05:24
@guesung guesung added Setting ์„ธํŒ…์„ ์ง„ํ–‰ํ•œ ๊ฒฝ์šฐ and removed Test ํ…Œ์ŠคํŠธ ์ค‘์ธ ๊ฒฝ์šฐ ๐Ÿž Bug labels Jul 5, 2023
@guesung guesung changed the title ๐Ÿ”ฌ Test : ๋ฐฐํฌ ํ…Œ์ŠคํŠธ ๐Ÿ”ง Setting : Github Action ์ด์šฉํ•œ ๋ฐฐํฌ Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Setting ์„ธํŒ…์„ ์ง„ํ–‰ํ•œ ๊ฒฝ์šฐ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant