Skip to content

Commit

Permalink
Switch to awk
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Crawfis <[email protected]>
  • Loading branch information
AaronCrawfis committed Jan 22, 2024
1 parent 9507f06 commit d18571d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ jobs:
if: github.event_name == 'pull_request'
run: |
# Within docs/config.toml, replace the line that starts with "github_branch" with "github_branch: $GITHUB_HEAD_REF"
sed -i "s/github_branch = .*/github_branch = \"$GITHUB_HEAD_REF\"/" docs/config.toml
awk -v branch="$GITHUB_HEAD_REF" '/^github_branch/ { print "github_branch: " branch; next }1' ./docs/config.toml > ./docs/config.toml.tmp
mv ./docs/config.toml.tmp ./docs/config.toml
- name: Build Hugo Site
run: |
cd docs
Expand Down

0 comments on commit d18571d

Please sign in to comment.