Skip to content

Commit

Permalink
refactor docs with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
xoolive committed Jan 2, 2025
1 parent 5f007e3 commit c52f15f
Show file tree
Hide file tree
Showing 13 changed files with 90,614 additions and 192,675 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ jobs:
with:
path: |
~/.cache/traffic/
~/.cache/opensky/
~/.cache/cartes/
key: traffic-${{ hashFiles('uv.lock') }}

- name: Cache folder for documentation
Expand All @@ -79,9 +77,7 @@ jobs:
- name: Ubuntu system dependencies
run: |
sudo apt update
sudo apt install -y libgdal-dev libgeos-dev libproj-dev proj-bin proj-data libarchive-dev npm fonts-ubuntu
# Weird issue with libarchive-dev
sudo ln -s -f /usr/lib/x86_64-linux-gnu/libarchive.a /usr/lib/x86_64-linux-gnu/liblibarchive.a
sudo apt install -y libgdal-dev libgeos-dev libproj-dev proj-bin proj-data npm fonts-ubuntu
- name: npm dependencies
run: |
Expand All @@ -94,28 +90,19 @@ jobs:
- name: Build pages
env:
LD_LIBRARY_PATH: /usr/local/lib
OPENSKY_USERNAME: ${{ secrets.OPENSKY_USERNAME }}
OPENSKY_PASSWORD: ${{ secrets.OPENSKY_PASSWORD }}
# PKCS12_PASSWORD: ${{ secrets.PKCS12_PASSWORD }}
CARTES_CACHE: ./cache
OPENSKY_CACHE: ./cache
OPENSKY_CACHE_NO_EXPIRE:
TRAFFIC_NM_PATH: /home/runner/work/traffic/traffic/traffic_data/airac_2111
TRAFFIC_TQDM_STYLE: silent
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRAFFIC_NOPLUGIN: ""
TRAFFIC_CACHE_NO_EXPIRE: ""
run: |
# This downloads the cache for cartes atlas
uv run python -c "from cartes.atlas import default, world_atlas"
# This downloads files to have in cache first
uv run traffic cache --fill
export TRAFFIC_CONFIG=$(uv run python -c "from traffic import config_file; print(config_file)")
sed -i "/tqdm_style =/ s,auto,silent," $TRAFFIC_CONFIG
sed -i "/nm_path =/ s,=$,= $PWD/traffic_data/airac_2111," $TRAFFIC_CONFIG
# sed -i "/pkcs12_filename =/ s,=.*$,= $PWD/traffic_data/CC0000007011_501_openssl.p12," $TRAFFIC_CONFIG
# sed -i "/pkcs12_password =/ s,=$,= $PKCS12_PASSWORD," $TRAFFIC_CONFIG
# Run the documentation
cd docs && CARTES_CACHE=./cache uv run make html
cd docs && uv run make html
- name: Deploy pages
uses: peaceiris/actions-gh-pages@v4
Expand Down
Loading

0 comments on commit c52f15f

Please sign in to comment.