Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/S3_Deploy_Hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out main
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4
with:
node-version: '20'
- name: NPM Install
run: npm install
run: npm ci
- name: Install Hugo withdeploy
run: |
HUGO_VERSION=$(node -e "const pkg=require('./package.json'); const version=(pkg.dependencies?.['hugo-extended'] || pkg.devDependencies?.['hugo-extended'] || '').replace(/^[~^]/, ''); if(!version){console.error('Could not determine hugo-extended version from package.json'); process.exit(1);} process.stdout.write(version);")
curl -fsSL -o /tmp/hugo-withdeploy.tar.gz "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_withdeploy_${HUGO_VERSION}_linux-amd64.tar.gz"
mkdir -p "$RUNNER_TEMP/hugo-bin"
tar -xzf /tmp/hugo-withdeploy.tar.gz -C "$RUNNER_TEMP/hugo-bin" hugo
chmod +x "$RUNNER_TEMP/hugo-bin/hugo"
echo "$RUNNER_TEMP/hugo-bin" >> "$GITHUB_PATH"
- name: Verify Hugo deploy support
run: |
hugo version
hugo help deploy
- name: Build Hugo
run: npm run build
- name: Deploy to S3
run: npm run deploy
run: hugo --minify
- name: Deploy to S3 (no CDN invalidation)
run: hugo deploy --target aws-deployment --invalidateCDN=false --maxDeletes -1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6.0.2

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v6.3.0
with:
node-version: '20'
node-version: '22'

- name: Install dependencies
run: npm install
Expand Down