Skip to content

Commit

Permalink
chore: do not index staging and dev deployments (#267)
Browse files Browse the repository at this point in the history
* feat: nofollow and noindex in non prod deployments

* fix: remove is-prod evaluating to true in dev/staging
  • Loading branch information
DiogoSoaress authored Feb 7, 2024
1 parent fb7e5ea commit d6555a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: ./.github/workflows/build
with:
secrets: ${{ toJSON(secrets) }}
is-production: true
is-production: ${{ true }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
- uses: ./.github/workflows/build
with:
secrets: ${{ toJSON(secrets) }}
is-production: false

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
Expand Down
3 changes: 3 additions & 0 deletions src/components/common/MetaTags/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { IS_PRODUCTION } from '@/config/constants'
import Head from 'next/head'

const defaultMetaTags = {
Expand Down Expand Up @@ -27,6 +28,8 @@ const MetaTags = (props: Partial<typeof defaultMetaTags>) => {
<meta name="twitter:title" content={seo.pageTitle} />
<meta name="twitter:description" content={seo.description} />
<meta name="twitter:image" content={seo.image} />

{!IS_PRODUCTION && <meta name="robots" content="none" />}
</Head>
)
}
Expand Down

0 comments on commit d6555a1

Please sign in to comment.