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
35 changes: 18 additions & 17 deletions .github/actions/build-website/action.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: 'Build huroutes'
description: 'Builds the huroutes website from source'
runs:
using: 'composite'
steps:
- name: Minify the website code
shell: bash
run: |
sudo pip install minify-html==0.15.0
sudo pip install rjsmin==1.2.3
sudo pip install rcssmin==1.2.0
sudo pip install lxml==5.3.0
python ".github/scripts/optimize-site.py" .
runs:
using: 'composite'
steps:
- name: Set up isolated Python environment
shell: bash
run: |
python -m venv "$RUNNER_TEMP/huroutes-build-venv"
"$RUNNER_TEMP/huroutes-build-venv/bin/python" -m pip install --disable-pip-version-check minify-html==0.15.0 rjsmin==1.2.3 rcssmin==1.2.0 lxml==5.3.0 kml2geojson==5.1.0
echo "HUROUTES_BUILD_PYTHON=$RUNNER_TEMP/huroutes-build-venv/bin/python" >> "$GITHUB_ENV"
- name: Minify the website code
shell: bash
run: |
"$HUROUTES_BUILD_PYTHON" ".github/scripts/optimize-site.py" .
- name: Download curves data
# This step downloads and converts autogenerated curvature data for a map overlay.
# The script supports processing KMZ files provided by kml.roadcurvature.com. "Curve" KMZ format is not supported.
shell: bash
run: |
sudo pip install kml2geojson==5.1.0
python ".github/scripts/get-curve-map.py" "https://kml.roadcurvature.com/europe/hungary.c_1000.kmz" "map/curves.geo.json" "map/curves-style.json"
# This step downloads and converts autogenerated curvature data for a map overlay.
# The script supports processing KMZ files provided by kml.roadcurvature.com. "Curve" KMZ format is not supported.
shell: bash
run: |
"$HUROUTES_BUILD_PYTHON" ".github/scripts/get-curve-map.py" "https://kml.roadcurvature.com/europe/hungary.c_1000.kmz" "map/curves.geo.json" "map/curves-style.json"
14 changes: 9 additions & 5 deletions .github/workflows/deploy-pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ jobs:
deploy-pr-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build the website
uses: ./.github/actions/build-website
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Build the website
uses: ./.github/actions/build-website
- name: Deploy
uses: rossjrw/pr-preview-action@v1
with:
source-dir: .
umbrella-dir: pr
umbrella-dir: pr
14 changes: 9 additions & 5 deletions .github/workflows/deploy-website-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ jobs:
deploy-website:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build the website
uses: ./.github/actions/build-website
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Build the website
uses: ./.github/actions/build-website
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
clean-exclude: pr/
folder: .
folder: .
33 changes: 19 additions & 14 deletions .github/workflows/huroutes-static-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Ensure the jsonschema lib
run: sudo pip install jsonschema
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Run the check
run: python ".github/scripts/validate-database.py" data.json data.schema.json
run: |
python -m venv "$RUNNER_TEMP/huroutes-test-venv"
"$RUNNER_TEMP/huroutes-test-venv/bin/python" -m pip install --disable-pip-version-check jsonschema
"$RUNNER_TEMP/huroutes-test-venv/bin/python" ".github/scripts/validate-database.py" data.json data.schema.json
codeql:
# Runs CodeQL checks on javascript source code
name: Analyze
Expand All @@ -34,13 +39,13 @@ jobs:
matrix:
language: [ 'javascript' ]
steps:
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Checkout
uses: actions/checkout@v3
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Checkout
uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
Loading