Skip to content

Commit e08bef4

Browse files
committed
Fix Robots.txt to be automatically generated for Production
1 parent 39b0607 commit e08bef4

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

.github/workflows/gh-pages.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ jobs:
7474
runs-on: ubuntu-latest
7575
if: github.event_name == 'push' || needs.check.outputs.cacheHit != 'true'
7676
steps:
77+
- uses: actions/setup-go@v5
78+
with:
79+
go-version: '1.18.1'
80+
7781
- uses: actions/checkout@v4
7882

7983
- name: Cache Zotero Bibliography
@@ -107,7 +111,7 @@ jobs:
107111
- name: Setup Hugo
108112
uses: peaceiris/actions-hugo@v3
109113
with:
110-
hugo-version: '0.127.0'
114+
hugo-version: '0.133.1'
111115
extended: true
112116

113117
- name: Setup Node
@@ -120,11 +124,12 @@ jobs:
120124
- run: npm install --verbose
121125

122126
- name: Build
123-
run: hugo -e $hugoEnvironment
127+
run: hugo -e $hugoEnvironment -d ~/temp/deploy
124128

125-
- name: Deploy
126-
uses: peaceiris/actions-gh-pages@v4
127-
if: github.ref == 'refs/heads/main'
128-
with:
129-
github_token: ${{ secrets.GITHUB_TOKEN }}
130-
publish_dir: ./public
129+
130+
# - name: Deploy
131+
# uses: peaceiris/actions-gh-pages@v4
132+
# if: github.ref == 'refs/heads/main'
133+
# with:
134+
# github_token: ${{ secrets.GITHUB_TOKEN }}
135+
# publish_dir: ./public

layouts/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Production robots.txt
2+
#
3+
User-agent: *
4+
Allow: /

static/robots.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# See config/production/hugo.yaml
33
#
44
User-agent: *
5-
Disallow: /
5+
Disallow: /

0 commit comments

Comments
 (0)