💄 Adjust colors in tooltip & locator maps to match updated legend colors #130
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: Deploy to AWS | |
on: | |
push: | |
branches: [main, production] | |
jobs: | |
scraper: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ["20.x"] | |
python-version: ["3.11"] | |
pipenv-version: ["2024.1.0"] | |
steps: | |
# Checkout repository | |
- uses: actions/checkout@v4 | |
# Environment variables | |
- name: Set environment variables for staging | |
if: endsWith(github.ref, '/main') | |
run: | | |
echo "STAGE=staging" >> $GITHUB_ENV | |
echo "NASA_WALDBRANDDATEN_RHODOS_CHART_ID=2zgmZ" >> $GITHUB_ENV | |
echo "NASA_WALDBRANDDATEN_MAUI_CHART_ID=XNvar" >> $GITHUB_ENV | |
echo "NASA_WALDBRANDDATEN_TENERIFFA_CHART_ID=Ja0Eq" >> $GITHUB_ENV | |
- name: Set environment variables for production | |
if: endsWith(github.ref, '/production') | |
run: | | |
echo "STAGE=prod" >> $GITHUB_ENV | |
echo "NASA_WALDBRANDDATEN_RHODOS_CHART_ID=nru3h" >> $GITHUB_ENV | |
echo "NASA_WALDBRANDDATEN_MAUI_CHART_ID=folgL" >> $GITHUB_ENV | |
echo "NASA_WALDBRANDDATEN_TENERIFFA_CHART_ID=Xwt4r" >> $GITHUB_ENV | |
# Set up Python and install dependencies | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pipenv" | |
- name: Install pipenv | |
run: pip install "pipenv==${{ matrix.pipenv-version }}" | |
- run: pipenv sync --dev | |
# Set up Serverless for deployment | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- name: Install Node.js dependencies | |
run: npm ci --production | |
# Additional caching | |
- name: Cache serverless-python-requirements | |
id: serverless-python-cache | |
uses: actions/cache@v4 | |
with: | |
path: .serverless-python-cache | |
key: serverless-python-cache-${{ hashFiles('**/pipfile.lock', '**/serverless.part.yml') }} | |
# Deploy | |
- name: Generate serverless.yml | |
run: pipenv run manage generate | |
- name: Render requirements.txt | |
run: pipenv requirements > requirements.txt | |
- name: Deploy with serverless | |
run: pipenv run npx serverless deploy | |
env: | |
STAGE: ${{ env.STAGE }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SWR_BENZINPREISE_SERVICE_ACCOUNT: ${{ secrets.SWR_BENZINPREISE_SERVICE_ACCOUNT }} | |
# Map key and datawrapper token are shared between staging and production and different scrapers | |
NASA_WALDBRANDDATEN_RHODOS_MAP_KEY: ${{ secrets.NASA_WALDBRANDDATEN_RHODOS_MAP_KEY }} | |
NASA_WALDBRANDDATEN_RHODOS_DATAWRAPPER_TOKEN: ${{ secrets.NASA_WALDBRANDDATEN_RHODOS_DATAWRAPPER_TOKEN }} | |
NASA_WALDBRANDDATEN_RHODOS_CHART_ID: ${{ env.NASA_WALDBRANDDATEN_RHODOS_CHART_ID }} | |
NASA_WALDBRANDDATEN_MAUI_CHART_ID: ${{ env.NASA_WALDBRANDDATEN_MAUI_CHART_ID }} | |
NASA_WALDBRANDDATEN_TENERIFFA_DATAWRAPPER_TOKEN: ${{ secrets.NASA_WALDBRANDDATEN_TENERIFFA_DATAWRAPPER_TOKEN }} | |
NASA_WALDBRANDDATEN_TENERIFFA_CHART_ID: ${{ env.NASA_WALDBRANDDATEN_TENERIFFA_CHART_ID }} | |
TALSPERREN_DATAWRAPPER_TOKEN: ${{ secrets.NASA_WALDBRANDDATEN_RHODOS_DATAWRAPPER_TOKEN }} |