Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,24 @@ jobs:

- name: Check if documentation can be built
run: uv run mkdocs build

deploy-docs:
# Publish the docs to GitHub Pages on every push to main, but never from a
# pull request. Gated behind check-docs so a broken build is never deployed.
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: check-docs
runs-on: ubuntu-latest
permissions:
contents: write # gh-deploy pushes the built docs to the gh-pages branch
concurrency:
group: deploy-docs
cancel-in-progress: false
steps:
- name: Check out
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-python-env

- name: Deploy documentation
run: uv run mkdocs gh-deploy --force
15 changes: 0 additions & 15 deletions .github/workflows/on-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,3 @@ jobs:
with:
attestations: true
print-hash: true

deploy-docs:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write # gh-deploy pushes the built docs to the gh-pages branch
steps:
- name: Check out
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Set up the environment
uses: ./.github/actions/setup-python-env

- name: Deploy documentation
run: uv run mkdocs gh-deploy --force
14 changes: 0 additions & 14 deletions .readthedocs.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Simple Usage
~~~~~~~~~~~~

In the simplest case, initialize the Flask-Cors extension with default arguments in order to allow CORS for all domains on all routes.
See the full list of options in the `documentation <https://flask-cors.readthedocs.io/en/latest/api.html#extension>`__.
See the full list of options in the `documentation <https://flask-cors.corydolphin.com/extension/>`__.

.. code:: python

Expand All @@ -51,7 +51,7 @@ Resource specific CORS
^^^^^^^^^^^^^^^^^^^^^^

Alternatively, you can specify CORS options on a resource and origin level of granularity by passing a dictionary as the `resources` option, mapping paths to a set of options.
See the full list of options in the `documentation <https://flask-cors.readthedocs.io/en/latest/api.html#extension>`__.
See the full list of options in the `documentation <https://flask-cors.corydolphin.com/extension/>`__.

.. code:: python

Expand All @@ -67,7 +67,7 @@ Route specific CORS via decorator

This extension also exposes a simple decorator to decorate flask routes with.
Simply add ``@cross_origin()`` below a call to Flask's ``@app.route(..)`` to allow CORS on a given route.
See the full list of options in the `decorator documentation <https://flask-cors.readthedocs.io/en/latest/api.html#decorator>`__.
See the full list of options in the `decorator documentation <https://flask-cors.corydolphin.com/decorator/>`__.

.. code:: python

Expand All @@ -79,7 +79,7 @@ See the full list of options in the `decorator documentation <https://flask-cors
Documentation
-------------

For a full list of options, please see the full `documentation <https://flask-cors.readthedocs.io/en/latest/api.html>`__
For a full list of options, please see the full `documentation <https://flask-cors.corydolphin.com/>`__

Troubleshooting
---------------
Expand Down
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flask-cors.corydolphin.com
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: flask-cors
repo_url: https://github.com/corydolphin/flask-cors
site_url: https://corydolphin.github.io/flask-cors
site_url: https://flask-cors.corydolphin.com
site_description: CORS
site_author: Cory Dolphin
edit_uri: edit/main/docs/
Expand Down
Loading