Skip to content

Commit

Permalink
feat: Add the ability redirect to moved files.
Browse files Browse the repository at this point in the history
* Add the conf to generate redirects based on changes between a branch
  and master.

* Add a CI check so we don't miss files that got moved around.
  • Loading branch information
Feanil Patel committed Mar 9, 2023
1 parent 57da39b commit b7451cb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches:
- '**'

jobs:
check_for_moved_files:
name:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: pip install -r requirements/pip.txt

- name: Install Dependencies
run: pip install -r requirements/base.txt

- name: Run Rediraffe Check
run: make check_redirects
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,11 @@ requirements:

dev-requirements:
pip install -r requirements/dev.txt

update_redirects:
# If files got moved there should be a redirect in redirects.txt
sphinx-build -b rediraffewritediff oeps $(BUILDDIR)

check_redirects:
# Check to make sure that any files that got moved have a redirect in redirects.txt
sphinx-build -b rediraffecheckdiff oeps $(BUILDDIR)
Empty file added oeps/redirects.txt
Empty file.

0 comments on commit b7451cb

Please sign in to comment.