Skip to content

Merge pull request #144 from asfadmin/phrase-translations #165

Merge pull request #144 from asfadmin/phrase-translations

Merge pull request #144 from asfadmin/phrase-translations #165

name: Deploy to Github.io
on:
push:
branches:
- prod
- test
workflow_dispatch:
jobs:
build_and_deploy:
name: Build site and deploy
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
path: Discovery-MkDocs
- uses: actions/setup-python@v4
with:
path: Discovery-MkDocs
- name: Setup Python
env:
PHRASE_DISCOVERY_ACCESS_TOKEN: ${{ secrets.PHRASE_DISCOVERY_ACCESS_TOKEN }}
run: |
cd Discovery-MkDocs
echo $PWD
ls -l
python -m venv ./venv
source ./venv/bin/activate
python -m pip install wheel
python -m pip install -r requirements.txt
python -m pip list
echo "Calling for phrase to translate to md"
python -m phrase-translate-to-md markdown-docs
deactivate
- name: deploy to github.io
if: github.ref == 'refs/heads/prod'
shell: bash -l {0}
run: |
echo $PWD
cd Discovery-MkDocs
echo "mkdocs gh-deploy"
python -m venv ./venv
source ./venv/bin/activate
python -m pip install wheel
python -m pip install -r requirements.txt
python -m pip list
python -m mkdocs gh-deploy --force
deactivate