Skip to content

Merge pull request #251 from harishmohanraj/main #868

Merge pull request #251 from harishmohanraj/main

Merge pull request #251 from harishmohanraj/main #868

name: Deploy Redirect Page
on:
push:
branches: [main]
paths:
- ".github/workflows/deploy-website.yml"
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Create a fresh redirect HTML file
- name: Create redirect HTML
run: |
mkdir -p dist
cat > dist/index.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=https://docs.ag2.ai">
<script>window.location.href = "https://docs.ag2.ai";</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow this <a href="https://docs.ag2.ai">link to the new documentation</a>.
</body>
</html>
EOF
# Step 3: Deploy to gh-pages branch
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'Deploy redirect page'