Skip to content

feat: add deep links to feature items, docs, and blog (#94) #494

feat: add deep links to feature items, docs, and blog (#94)

feat: add deep links to feature items, docs, and blog (#94) #494

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
cache: true
- name: Use Node.js
uses: actions/setup-node@v7
with:
node-version: 24
- name: Install dependencies and build
run: |
pnpm install --no-frozen-lockfile
pnpm run build
- name: Generate sitemap
run: node scripts/generate-sitemap.js
- name: Push to IndexNow
env:
INDEXNOW_KEY: ${{ secrets.INDEXNOW_KEY }}
HOST: rustfs.com
run: |
URLS=$(grep -oP '(?<=<loc>)[^<]+' out/sitemap.xml)
JSON=$(jq -n \
--arg host "$HOST" \
--arg key "$INDEXNOW_KEY" \
--arg keyLoc "https://$HOST/$INDEXNOW_KEY.txt" \
--argjson urls "$(echo "$URLS" | jq -R . | jq -s .)" \
'{host:$host, key:$key, keyLocation:$keyLoc, urlList:$urls}')
curl -X POST "https://api.indexnow.org/indexnow" \
-H "Content-Type: application/json" \
-d "$JSON" \
-w "\nIndexNow HTTP %{http_code}\n"