Skip to content

Build and Deploy

Build and Deploy #210

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
#- main_techb0lt
paths:
- mkdocs.yml
- requirements.txt
- 'docs/**'
- 'includes/abbreviations.md'
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Set up environment
env:
NCCDB_API_KEY: ${{ secrets.NCCDB_API_KEY }}
NUTRITIONIX_APP_ID: ${{ secrets.NUTRITIONIX_APP_ID }}
NUTRITIONIX_APP_KEY: ${{ secrets.NUTRITIONIX_APP_KEY }}
run: |
echo "NCCDB_API_KEY=$NCCDB_API_KEY" >> $GITHUB_ENV
echo "NUTRITIONIX_APP_ID=$NUTRITIONIX_APP_ID" >> $GITHUB_ENV
echo "NUTRITIONIX_APP_KEY=$NUTRITIONIX_APP_KEY" >> $GITHUB_ENV
- run: pip install -r requirements.txt
- run: mkdocs gh-deploy --force
env:
REPO_URL: ${{ vars.REPO_URL }}
EDIT_URL: ${{ vars.EDIT_URL }}
SITE_URL: ${{ vars.SITE_URL }}