Skip to content

Commit 3ebaf63

Browse files
Update update-demo-page.yml
1 parent 4f7ab73 commit 3ebaf63

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/update-demo-page.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,20 @@ jobs:
3939
- name: Copy exampleSite content to new site
4040
run: cp -r ./exampleSite/* /tmp/demo-site
4141

42-
- name: Adjust the baseURL for gh-pages
43-
run: sed -i "s/baseURL = .*$/baseURL = \"https:\/\/lednerb.github.io\/bilberry-hugo-theme\/\"/" /tmp/demo-site/config.toml
44-
4542
- name: Init Hugo module
4643
working-directory: /tmp/demo-site
47-
run: hugo mod init github.com/Lednerb/bilberry-hugo-theme/exampleSite
44+
run: |
45+
hugo mod init github.com/Lednerb/bilberry-hugo-theme/exampleSite
46+
hugo mod get
47+
cat go.mod
48+
49+
- name: Adjust config.yml
50+
working-directory: /tmp/demo-site
51+
run: |
52+
sed -i "s/baseURL = .*$/baseURL = \"https:\/\/lednerb.github.io\/bilberry-hugo-theme\/\"/" config.toml
53+
version=$(grep -o 'v[0-9]\.[0-9][0-9]\.[0-9]' go.mod)
54+
sed -i "s/creditsText = .*$/creditsText = \"Bilberry Hugo Theme $version\"/" config.toml
55+
sed -i "s/creditsUrl = .*$/creditsUrl = \"https:\/\/github.com\/Lednerb\/bilberry-hugo-theme\/tree\/$version\"/" config.toml
4856
4957
- name: Build
5058
working-directory: /tmp/demo-site

0 commit comments

Comments
 (0)