Skip to content

Commit

Permalink
Merge pull request #62 from ugns/test-new-hugo
Browse files Browse the repository at this point in the history
Try upgrade hugo without modules
  • Loading branch information
jbouse authored Feb 15, 2025
2 parents 7ca4b0c + 443bc08 commit 1bcd0b3
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 308 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ jobs:
node-version: 'lts/*'

- run: npm ci

- run: npm i -g sass

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.128.0'
hugo-version: '0.136.5'
extended: true

- uses: actions/cache@v4
Expand All @@ -128,7 +127,7 @@ jobs:
${{ runner.os }}-hugomod-
- name: Hugo Build
run: hugo --gc --enableGitInfo --minify --baseURL https://${{ needs.deploy-infra.outputs.baseurl }}/
run: hugo build --gc --cleanDestinationDir --enableGitInfo --minify --baseURL https://${{ needs.deploy-infra.outputs.baseurl }}/

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -143,15 +142,23 @@ jobs:
role-chaining: true
aws-region: us-east-1

- name: Update Hugo Deployment
run: |
sed -i "s@CLOUDFRONT_DISTRIBUTION_ID@${{ needs.deploy-infra.outputs.distribution }}@g" config/production/deployment.yaml
sed -i "s@S3_BUCKET_URL@${{ needs.deploy-infra.outputs.bucket }}@g" config/production/deployment.yaml
# - name: Update Hugo Deployment
# run: |
# sed -i "s@CLOUDFRONT_DISTRIBUTION_ID@${{ needs.deploy-infra.outputs.distribution }}@g" config/production/deployment.yaml
# sed -i "s@S3_BUCKET_URL@${{ needs.deploy-infra.outputs.bucket }}@g" config/production/deployment.yaml

- name: Hugo Deploy (dry-run)
if: github.event_name == 'pull_request'
run: hugo deploy --dryRun --target AWS
# - name: Hugo Deploy (dry-run)
# if: github.event_name == 'pull_request'
# run: hugo deploy --dryRun --target AWS

- name: Hugo Deploy
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: hugo deploy --maxDeletes -1 --target AWS --logLevel info
# run: hugo deploy --maxDeletes -1 --target AWS --logLevel info
uses: reggionick/s3-deploy@v4
with:
folder: public
bucket: ${{ needs.deploy-infra.outputs.bucket }}
bucket-region: us-east-1
delete-removed: true
cache: 3600
dist-id: ${{ needs.deploy-infra.outputs.distribution }}
Loading

0 comments on commit 1bcd0b3

Please sign in to comment.