From a18cfab6cecc994b68fad84fe8e7a6a71b322f5d Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Thu, 8 Aug 2024 10:17:11 -0700 Subject: [PATCH] Add Action to push Jafner.dev generated files to S3 bucket --- .github/workflows/Jafner.dev_hugo.yaml | 21 +++++++++++++++++++-- README.md | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Jafner.dev_hugo.yaml b/.github/workflows/Jafner.dev_hugo.yaml index 8e4e1817..244b80a1 100644 --- a/.github/workflows/Jafner.dev_hugo.yaml +++ b/.github/workflows/Jafner.dev_hugo.yaml @@ -62,7 +62,7 @@ jobs: with: path: 'sites/Jafner.dev/public' - deploy: + deploy-github-pages: environment: name: github-pages url: https://jafner.dev/ @@ -71,4 +71,21 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4 + + deploy-s3: + environment: + name: s3 + url: https://jafner.dev/ + runs-on: ubuntu-latest + needs: build + steps: + - name: Authenticate AWS CLI + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + - name: Push generated files to jafner-dev bucket + run: | + aws s3 sync sites/Jafner.dev/public s3://jafner-dev --delete \ No newline at end of file diff --git a/README.md b/README.md index eb3286ad..1c136d47 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Jafner.net -A monorepo for all my projects and dotfiles. +A monorepo for all my projects and dotfiles. Hosted on [my Gitea](https://gitea.jafner.tools/Jafner/Jafner.net) and mirrored to [GitHub](https://github.com/Jafner/Jafner.net). ## Map of Contents