From d8646853fa7fe7448cfe88eb04ef97261d706d77 Mon Sep 17 00:00:00 2001 From: Lin Guo Date: Thu, 8 Aug 2024 23:19:32 -0700 Subject: [PATCH] Redirect root gh-pages to the new rtd doc site Set up a workflow for the deployment. --- .github/workflows/gh-pages-deploy.yaml | 43 +++++++++++++++++++ lib/ramble/docs/_gh_pages_redirect/.nojekyll | 0 lib/ramble/docs/_gh_pages_redirect/index.html | 14 ++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/gh-pages-deploy.yaml create mode 100644 lib/ramble/docs/_gh_pages_redirect/.nojekyll create mode 100644 lib/ramble/docs/_gh_pages_redirect/index.html diff --git a/.github/workflows/gh-pages-deploy.yaml b/.github/workflows/gh-pages-deploy.yaml new file mode 100644 index 000000000..3ec8955e8 --- /dev/null +++ b/.github/workflows/gh-pages-deploy.yaml @@ -0,0 +1,43 @@ +# Workflow for deploying a single redirect page to GitHub Pages +name: gh-pages deploy + +on: + # Runs on pushes targeting the default branch + push: + branches: ["develop"] + + # 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: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Only deploy the redirect directory + path: './lib/ramble/docs/_gh_pages_redirect' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/lib/ramble/docs/_gh_pages_redirect/.nojekyll b/lib/ramble/docs/_gh_pages_redirect/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/lib/ramble/docs/_gh_pages_redirect/index.html b/lib/ramble/docs/_gh_pages_redirect/index.html new file mode 100644 index 000000000..59907abdf --- /dev/null +++ b/lib/ramble/docs/_gh_pages_redirect/index.html @@ -0,0 +1,14 @@ + + + + + + + + +

+ This page has moved to https://ramble.readthedocs.io/ +

+ + +