mirror of
https://github.com/penpot/penpot.git
synced 2026-03-12 13:27:02 +00:00
🔧 Disable search indexing of plugin docs for non-production envs
This commit is contained in:
committed by
David Barragán Merino
parent
7248db28c8
commit
b314faa0e9
17
.github/workflows/plugins-deploy-api-doc.yml
vendored
17
.github/workflows/plugins-deploy-api-doc.yml
vendored
@@ -104,6 +104,23 @@ jobs:
|
||||
run: |
|
||||
sed -i "s/WORKER_URI/${{ env.WORKER_URI }}/g" wrangler-penpot-plugins-api-doc.toml
|
||||
|
||||
- name: Add noindex header and robots.txt files for non-production environments
|
||||
if: ${{ steps.vars.outputs.gh_ref != 'main' }}
|
||||
working-directory: plugins
|
||||
shell: bash
|
||||
run: |
|
||||
ASSETS_DIR="dist/doc"
|
||||
|
||||
cat > "${ASSETS_DIR}/_headers" << 'EOF'
|
||||
/*
|
||||
X-Robots-Tag: noindex, nofollow
|
||||
EOF
|
||||
|
||||
cat > "${ASSETS_DIR}/robots.txt" << 'EOF'
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
EOF
|
||||
|
||||
- name: Deploy to Cloudflare Workers
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
|
||||
17
.github/workflows/plugins-deploy-styles-doc.yml
vendored
17
.github/workflows/plugins-deploy-styles-doc.yml
vendored
@@ -102,6 +102,23 @@ jobs:
|
||||
run: |
|
||||
sed -i "s/WORKER_URI/${{ env.WORKER_URI }}/g" wrangler-penpot-plugins-styles-doc.toml
|
||||
|
||||
- name: Add noindex header and robots.txt files for non-production environments
|
||||
if: ${{ steps.vars.outputs.gh_ref != 'main' }}
|
||||
working-directory: plugins
|
||||
shell: bash
|
||||
run: |
|
||||
ASSETS_DIR="dist/apps/example-styles"
|
||||
|
||||
cat > "${ASSETS_DIR}/_headers" << 'EOF'
|
||||
/*
|
||||
X-Robots-Tag: noindex, nofollow
|
||||
EOF
|
||||
|
||||
cat > "${ASSETS_DIR}/robots.txt" << 'EOF'
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
EOF
|
||||
|
||||
- name: Deploy to Cloudflare Workers
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user