From 1f99e8ec0d2139f37bf9d330281ef6f75508533f Mon Sep 17 00:00:00 2001 From: Jaemin Choi <1dotolee@gmail.com> Date: Fri, 27 Oct 2023 00:37:09 +0900 Subject: [PATCH] feat: configure auto deploy --- .github/workflows/deploy.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a60060b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy + +on: + push: + branches: [main] + +jobs: + deploy: + name: Deploy to S3 + runs-on: ubuntu-latest + environment: production + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} + aws-region: ap-northeast-2 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + + - name: Build + run: hugo --minify + + - name: Deploy + run: hugo deploy