Merge pull request #154 from asfadmin/test #175
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 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 |