removing starlette and docs folder to save space #5
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: Build cgp-pygeoapi | |
on: | |
push: | |
branches: | |
- production | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- python-version: '3.10' | |
env: | |
PYGEOAPI_CONFIG: "$(pwd)/pygeoapi-config.yml" | |
steps: | |
- name: Clear up GitHub runner diskspace | |
run: | | |
echo "Space before" | |
df -h / | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /usr/share/dotnet | |
echo "Space after" | |
df -h / | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
name: Setup Python ${{ matrix.python-version }} | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Configure sysctl limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- name: Install requirements | |
run: | | |
pip3 install -r requirements.txt | |
pip3 install -r docs/requirements.txt | |
python3 setup.py install | |
- name: Build translations | |
run: | | |
pybabel extract -F babel-mapping.ini -o locale/messages.pot . | |
pybabel update -d locale -l en -i locale/messages.pot | |
pybabel update -d locale -l fr -i locale/messages.pot | |
pybabel compile -d locale -l en | |
pybabel compile -d locale -l fr | |
- name: Set current date as env variable | |
run: echo "NOW=$(date +'%Y%m%d-%H%M')" >> $GITHUB_ENV | |
- name: Upload zip file artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cgp_pygeoapi-${{ env.NOW }} | |
path: ${{ github.workspace }}/* |