Skip to content

Commit

Permalink
removing submodules (a pain)
Browse files Browse the repository at this point in the history
  • Loading branch information
caiocsgomes committed Mar 16, 2024
1 parent ff44111 commit 6a9d3bb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 33 deletions.
45 changes: 17 additions & 28 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Workflow name
name: S3 Deploy

on:
workflow_dispatch:
push:
Expand All @@ -9,39 +8,30 @@ on:
- '.github/workflows/deploy.yml'
branches:
- master

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
AWS_REGION: sa-east-1
BUCKET_NAME: caiogomes.me
steps:
- name: Install hugo
run: sudo apt install hugo

- name: configure aws credentials
uses: aws-actions/[email protected]
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}

- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'

- name: Build
run: cd app/ && hugo

- name: Upload files to S3
run: aws s3 sync app/public/ s3://${{ env.BUCKET_NAME }}/ --exact-timestamps --delete

- name: Install hugo
run: sudo apt install hugo
- name: configure aws credentials
uses: aws-actions/[email protected]
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}
- name: Checkout repository
uses: actions/checkout@v3
- name: Build
run: cd app/ && hugo
- name: Upload files to S3
run: aws s3 sync app/public/ s3://${{ env.BUCKET_NAME }}/ --exact-timestamps --delete
create-cloudfront-invalidation:
needs: build-and-deploy
runs-on: ubuntu-latest
Expand All @@ -55,6 +45,5 @@ jobs:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}

- name: Invalidate clodufront distribution
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ https://gohugo.io/installation/

2\. Clone the repo
```bash
git clone --recurse-submodules https://github.com/caiocsgomes/caiogomes.me.git
git clone https://github.com/caiocsgomes/caiogomes.me.git
```

3\. Change to the app folder
Expand Down

0 comments on commit 6a9d3bb

Please sign in to comment.