Skip to content

feat: add Nawāt to AI integration and update button text (#82) #484

feat: add Nawāt to AI integration and update button text (#82)

feat: add Nawāt to AI integration and update button text (#82) #484

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: Install Aliyun OSS CLI
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
shell: bash
run: |
echo "Installing ossutil2"
curl -o ossutil.zip https://gosspublic.alicdn.com/ossutil/v2/2.1.1/ossutil-2.1.1-linux-amd64.zip
unzip -o ossutil.zip
chmod 755 ossutil-2.1.1-linux-amd64/ossutil
sudo mv ossutil-2.1.1-linux-amd64/ossutil /usr/local/bin/
rm -rf ossutil.zip ossutil-2.1.1-linux-amd64
echo "ossutil2 installation completed"
- name: Upload to Aliyun OSS
# if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
shell: bash
env:
OSS_ACCESS_KEY_ID: ${{ secrets.ALICLOUDOSS_KEY_ID }}
OSS_ACCESS_KEY_SECRET: ${{ secrets.ALICLOUDOSS_KEY_SECRET }}
OSS_REGION: cn-beijing
OSS_ENDPOINT: https://oss-cn-beijing.aliyuncs.com
run: |
echo "Uploading to OSS"
# ossutil rm -r oss://rustfs/ --force
ossutil cp -r ./out/ oss://rustfs/ --force
echo "Successfully uploaded to OSS"
- 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"
- name: Show OSS error log if exists
if: failure()
run: |
cat /home/runner/work/rustfs.com/rustfs.com/ossutil_output/*.report || true