Skip to content

Merge pull request #2025 from rcgsheffield/dependabot/github_actions/… #3

Merge pull request #2025 from rcgsheffield/dependabot/github_actions/…

Merge pull request #2025 from rcgsheffield/dependabot/github_actions/… #3

Workflow file for this run

---
name: Deploy site static content to Github Pages
on:
# Runs on pushes targeting the default branch.
push:
branches: ["master"]
# Or 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 deployment at a time.
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying the once to Github Pages.
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
strategy:
# Spawn and run a job for Python 3.10 version.
matrix:
python: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v4
# Install Python.
- name: Set up a version of Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# Install Tox for build stage.
- name: Upgrade pip and install Tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
# Run build stage - py37 should suffice.
- name: Build the pages
run: tox -e py310
# Match old RTD directories pathing.
- name: Move built files
run: |
mkdir -p _build/html/en/latest
cd _build/html/
find . -mindepth 1 -maxdepth 1 -not -name en -exec mv -t en/latest {} +
cd ../../
- name: Add webroot redirect HTML index page.
run: |
cp rtd-root-redirect.html _build/html/index.html
- name: Add Google Search console site verification
run: |
cp gsv/google92a5d9499987ed3e.html _build/html/google92a5d9499987ed3e.html
- name: Add robots.txt
run: |
cp robots-txt/robots.txt _build/html/robots.txt
- name: Setup Pages
uses: actions/configure-pages@v4
# Make the artifact which is used to deploy.
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Make the artifact with the HTML build directory.
path: '_build/html'
# Now deploy with the artifact.
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4