From ddb8f6f557f3e0f992e10a5da10b82eac861cff0 Mon Sep 17 00:00:00 2001 From: Joe Bellus Date: Wed, 29 Jul 2020 22:19:00 -0400 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..958cffb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Deploy + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Node.js environment + uses: actions/setup-node@v1.4.1 + with: + node-version: 11.x + - name: Setup AWS CLI + uses: chrislennon/action-aws-cli@1.1 + - name: Hugo setup + uses: peaceiris/actions-hugo@v2.4.12 + with: + extended: false + - name: Deploy + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} + AWS_DEFAULT_REGION: ${{ secrets.us-east1 }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_SECRET }} + run: | + aws s3 sync ./docs s3://${{ secrets.S3_BUCKET_NAME }} --delete;