fix: ensure consistent order of scripts in Component.Media.js (#783) #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Docs - build & deploy | |
on: | |
push: | |
tags: | |
# for versions 0.### (before 1.0.0) | |
- '0.[0-9]+' | |
# after 1.0.0 | |
- '[0-9]+.[0-9]+.[0-9]+' | |
branches: | |
- master | |
pull_request: | |
branches: | |
- main | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
docs: | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
contents: write # to let mkdocs write the new docs | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
runs-on: ubuntu-latest | |
# Only run in original repo (not in forks) | |
if: github.repository == 'EmilStenstrom/django-components' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install Hatch | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install -q hatch pre-commit | |
hatch --version | |
- name: Create Virtual Environment | |
run: hatch env create docs | |
- name: Configure git | |
run: | | |
# required for "mike deploy" command below which pushes to gh-pages | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
# Conditions make sure to select the right step, depending on the job trigger. | |
# Only one of the steps below will run at a time. The others will be skipped. | |
- name: Check docs in pull requests with strict mode | |
if: github.event_name == 'pull_request' | |
run: | | |
# XXX Enable strict mode once docs are clean | |
echo "Strict check of docs disabled." | |
# hatch run docs:build --strict | |
- name: Build & deploy "dev" docs for a new commit to master | |
if: github.event_name == 'push' && github.ref_type != 'tag' | |
run: | | |
export SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7) | |
hatch run docs:mike deploy --push --update-aliases --title "dev (${SHORT_SHA})" dev | |
- name: Build & deploy docs for a new tag | |
if: github.ref_type == 'tag' && github.event_name == 'push' | |
run: | | |
hatch run docs:mike deploy --push --update-aliases ${{ github.ref_name }} latest | |
hatch run docs:mike set-default latest --push | |
- name: Build & deploy docs for a new release | |
if: github.event_name == 'release' | |
run: | | |
hatch run docs:mike deploy --push --update-aliases ${{ github.ref_name }} latest | |
hatch run docs:mike set-default latest --push |