Skip to content

Commit

Permalink
work on docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Nov 5, 2022
1 parent 87b51ac commit f4f017c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/testing.yml
Expand Up @@ -95,6 +95,9 @@ jobs:
docs:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
Expand All @@ -103,14 +106,14 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
pip install --upgrade pip pip-tools
pip-sync emmet-*/requirements/ubuntu-latest_py3.9_extras.txt docs/requirements.txt
pip install --no-deps -e emmet-core emmet-api emmet-builders
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools
python${{ matrix.python-version }} -m piptools sync --user emmet-*/requirements/ubuntu-latest_py${{ matrix.python-version }}_extras.txt docs/requirements.txt
python${{ matrix.python-version }} -m pip install --user --no-deps -e ./emmet-core ./emmet-api ./emmet-builders
- name: Build
run: mkdocs build
19 changes: 16 additions & 3 deletions .github/workflows/upgrade-dependencies.yml
Expand Up @@ -21,13 +21,14 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Upgrade Python dependencies
shell: bash
run: |
pip install -U pip pip-tools
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools
cd ${{ matrix.package }}
pip-compile -q --upgrade -o requirements/${{ matrix.os }}_py${{ matrix.python-version }}.txt
pip-compile -q --upgrade --all-extras -o requirements/${{ matrix.os }}_py${{ matrix.python-version }}_extras.txt
python${{ matrix.python-version }} -m piptools compile -q --upgrade -o requirements/${{ matrix.os }}_py${{ matrix.python-version }}.txt
python${{ matrix.python-version }} -m piptools compile -q --upgrade --all-extras -o requirements/${{ matrix.os }}_py${{ matrix.python-version }}_extras.txt
- name: Detect changes
id: changes
shell: bash
Expand All @@ -48,10 +49,17 @@ jobs:
name: Merge all branches and open PR
runs-on: ubuntu-latest
needs: upgrade
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
cache: 'pip'
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: detect auto-upgrade-dependency branches
id: changes
run: echo "count=$(git branch -r | grep auto-dependency-upgrades- | wc -l | xargs)" >> $GITHUB_OUTPUT
Expand All @@ -63,6 +71,11 @@ jobs:
git checkout -b auto-dependency-upgrades
git branch -r | grep auto-dependency-upgrades- | xargs -I {} git merge {}
git rebase main
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools
cd docs
python${{ matrix.python-version }} -m piptools compile -q --upgrade
git add requirements.txt
git commit -m "update dependencies for docs"
git push -f origin auto-dependency-upgrades
git branch -r | grep auto-dependency-upgrades- | cut -d/ -f2 | xargs -I {} git push origin :{}
- name: Open pull request if needed
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.in
Expand Up @@ -6,4 +6,4 @@ mkdocstrings
mkdocs-awesome-pages-plugin
mkdocs-markdownextradata-plugin
livereload
jinja2<=3.0.0
jinja2

0 comments on commit f4f017c

Please sign in to comment.