-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.32 KB
/
deploy_to_github_io.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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