Skip to content

Commit

Permalink
workflow: add robots.txt to dev deploy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
szczys committed Nov 28, 2023
1 parent a1f9357 commit 1c46231
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/firebase-hosting-merge-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
name: Deploy to Firebase Hosting on merge to develop
'on':
push:
branches:
- develop
#branches:
#- develop
jobs:
build_and_deploy:
runs-on: ubuntu-latest
Expand All @@ -14,14 +14,18 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 20.9.0
- run: npm install && npm run build:dev
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GOLIOTH }}'
channelId: live
projectId: golioth
target: docs-dev
expires: 30d
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
- name: Build Docusaurus
run: npm install && npm run build:dev
- name: Add robots.txt for Dev site only
run: echo -e ${{ format("User-agent{0} *\nDisallow{1} /", ':', ':') }} > build/robots.txt
- run: cat build/robots.txt
#- uses: FirebaseExtended/action-hosting-deploy@v0
#with:
#repoToken: '${{ secrets.GITHUB_TOKEN }}'
#firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GOLIOTH }}'
#channelId: live
#projectId: golioth
#target: docs-dev
#expires: 30d
#env:
#FIREBASE_CLI_PREVIEWS: hostingchannels

0 comments on commit 1c46231

Please sign in to comment.