Update DeployWithDockerCompose.md #41
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: gen-doc-and-deploy-to-github-pages | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11.4] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install System Dependencies | |
run: | | |
sudo apt-get install cmake protobuf-compiler wget curl redis-server postgresql nginx | |
- name: Run System Services | |
run: | | |
sudo systemctl enable postgresql | |
sudo systemctl start postgresql | |
- name: Create Database Tables | |
run: | | |
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'opentera';" | |
sudo -u postgres psql -c "create database opentera;" | |
sudo -u postgres psql -c "create user TeraAgent with encrypted password 'tera';" | |
sudo -u postgres psql -c "grant all privileges on database opentera to TeraAgent;" | |
sudo -u postgres psql -c "ALTER USER TeraAgent WITH PASSWORD 'tera';" | |
sudo -u postgres psql -c "create database openteralogs;" | |
sudo -u postgres psql -c "grant all privileges on database openteralogs to TeraAgent;" | |
sudo -u postgres psql -c "create database openterafiles;" | |
sudo -u postgres psql -c "grant all privileges on database openterafiles to TeraAgent;" | |
sudo -u postgres psql -c "\l" | |
- name: Install Miniconda3 | |
run: | | |
echo $HOME | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
bash ./Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda3 | |
- name: Run CMake and build | |
working-directory: teraserver | |
run: | | |
cmake . | |
make python-all | |
echo "OPENTERA_PYTHON=$(echo $PWD/python/env/python-3.11/bin/python)" >> $GITHUB_ENV | |
echo "PYTHONPATH=$(echo $PWD/python)" >> $GITHUB_ENV | |
- name: Generate Self Signed TLS Certificates | |
working-directory: teraserver/python | |
run: | | |
$OPENTERA_PYTHON CreateCertificates.py | |
- name: Run NGINX Reverse Proxy | |
working-directory: teraserver/python/config | |
run: | | |
mkdir logs | |
./start_nginx.sh | |
- name: Start TeraServer With Tests Enabled | |
working-directory: teraserver/python | |
run: | | |
$OPENTERA_PYTHON TeraServer.py --enable_tests=1 & | |
sleep 10 | |
- name: Update API json documentation | |
working-directory: docs/services/teraserver/api | |
run: | | |
curl -O --insecure https://localhost:40075/api/swagger.json | |
- name: Generate base documentation | |
working-directory: docs | |
run: | | |
pip install -r requirements.txt | |
make html | |
touch _build/html/.nojekyll | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
folder: docs/_build/html | |