From 076153da6da63498dd0100659bfbc5e993c38d05 Mon Sep 17 00:00:00 2001 From: Kim Yoonsik Date: Fri, 25 Aug 2023 16:28:45 +0900 Subject: [PATCH 1/3] #15/feat/deploy static site --- .github/workflows/static.yaml | 26 ++++++++++++++++++++++++++ next.config.js | 4 +++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/static.yaml diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml new file mode 100644 index 0000000..5f73886 --- /dev/null +++ b/.github/workflows/static.yaml @@ -0,0 +1,26 @@ +on: + push: + branches: + - static + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build + run: | + yarn install + yarn build + + deploy: + runs-on: ubuntu-latest + steps: + - name: Upload to S3 + run: + aws s3 cp ./out s3://$AWS_S3_BUCKET --acl public-read + --delete --exclude '.git/*' + env: + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/next.config.js b/next.config.js index 767719f..8e81e6a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,6 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {} +const nextConfig = { + output: 'export', +} module.exports = nextConfig From 3f80cb4e586cb36acb607629b50167af9da1f3fa Mon Sep 17 00:00:00 2001 From: Kim Yoonsik <99208743+yunsik29@users.noreply.github.com> Date: Sat, 26 Aug 2023 15:14:45 +0900 Subject: [PATCH 2/3] static.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit yaml syntax 오류 수정 --- .github/workflows/static.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index 5f73886..5e712a5 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -17,10 +17,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Upload to S3 - run: - aws s3 cp ./out s3://$AWS_S3_BUCKET --acl public-read - --delete --exclude '.git/*' - env: + - run: aws s3 cp ./out s3://$AWS_S3_BUCKET --acl public-read --delete --exclude '.git/*' + - env: AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From 4a8e4a8aa7dbab4e299ce1d9b080baafc7a2611b Mon Sep 17 00:00:00 2001 From: Kim Yoonsik Date: Sun, 27 Aug 2023 23:01:15 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20yaml=20syntax=20=EC=98=A4=EB=A5=98?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/static.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index 5e712a5..a14d96c 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -1,10 +1,10 @@ -on: +on: push: branches: - static jobs: - build: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -16,9 +16,9 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - name: Upload to S3 - - run: aws s3 cp ./out s3://$AWS_S3_BUCKET --acl public-read --delete --exclude '.git/*' - - env: + - name: Upload to S3 + run: aws s3 cp ./out s3://$AWS_S3_BUCKET --acl public-read --delete --exclude '.git/*' + env: AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}