Skip to content

Add Terraform "for_each patterns" note #40

Add Terraform "for_each patterns" note

Add Terraform "for_each patterns" note #40

Workflow file for this run

---
name: build site
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.119.0'
extended: true
- name: Delete public/
run: rm -rf public/
- name: Build site
run: hugo --gc --minify --enableGitInfo
- name: Deploy site to deploy branch
run: |
git worktree add deploy
git config user.name "Deploy from CI"
git config user.email ""
cd deploy
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/deploy
rm -rf *
mv ../public/* .
git add .
git commit -m "Deploy $GITHUB_SHA to deploy"
git push --force --set-upstream origin deploy