Skip to content

Commit ff0c8c7

Browse files
committed
workflow: add robots.txt to dev deploy
Add robot.txt when docs.golioth.dev is deployed so that search engines will not index the preview site. Signed-off-by: Mike Szczys <mike@golioth.io>
1 parent a1f9357 commit ff0c8c7

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

.github/workflows/firebase-hosting-merge-develop.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
name: Deploy to Firebase Hosting on merge to develop
55
'on':
66
push:
7-
branches:
8-
- develop
7+
#branches:
8+
#- develop
99
jobs:
1010
build_and_deploy:
1111
runs-on: ubuntu-latest
@@ -14,14 +14,18 @@ jobs:
1414
- uses: actions/setup-node@v3
1515
with:
1616
node-version: 20.9.0
17-
- run: npm install && npm run build:dev
18-
- uses: FirebaseExtended/action-hosting-deploy@v0
19-
with:
20-
repoToken: '${{ secrets.GITHUB_TOKEN }}'
21-
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GOLIOTH }}'
22-
channelId: live
23-
projectId: golioth
24-
target: docs-dev
25-
expires: 30d
26-
env:
27-
FIREBASE_CLI_PREVIEWS: hostingchannels
17+
- name: Build Docusaurus
18+
run: npm install && npm run build:dev
19+
- name: Add robots.txt for Dev site only
20+
run: echo -e "${{ format("User-agent{0} *\nDisallow{1} /", ':', ':') }} > build/robots.txt
21+
- run: cat build/robots.txt
22+
#- uses: FirebaseExtended/action-hosting-deploy@v0
23+
#with:
24+
#repoToken: '${{ secrets.GITHUB_TOKEN }}'
25+
#firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GOLIOTH }}'
26+
#channelId: live
27+
#projectId: golioth
28+
#target: docs-dev
29+
#expires: 30d
30+
#env:
31+
#FIREBASE_CLI_PREVIEWS: hostingchannels

0 commit comments

Comments
 (0)