Skip to content

Build & Deploy Website #6

Build & Deploy Website

Build & Deploy Website #6

Workflow file for this run

name: Build & Deploy Website
on:
workflow_run:
workflows: [Algorithm Analysis]
types:
- completed
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Set up Python
id: setup_python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Cache pip
uses: actions/cache@v3
id: pip-cache
with:
key: ${{ runner.os }}-${{ env.pythonLocation }}-pip-${{ hashFiles('**/requirements.txt') }}
path: ${{ env.pythonLocation }}
if: steps.pip-cache.outputs.cache-hit != 'true'
- name: Install dependencies
run: |
pip install -r requirements.txt
# Action Figures artifact
- name: 'Download artifact'
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/actions/download-artifact
with:
name: 'Figures'
# Action analysis data artifact
- name: 'Download analysis data'
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/actions/download-artifact
with:
name: 'Data'
- name: 'Filter and compress results file.'
run: python utilities/reduce_output_size.py test_output.csv test_output.csv.gz
- name: move data to the dashboard folder
run: |
mv test_output.csv.gz website/dashboard
- name: Build documentation
run: |
mkdir docs/_static
mv *.pdf docs/_static/
sphinx-apidoc -o docs src
cd docs/
make html
- name: move data to the website folder
run: |
mv "docs/_build/html" "website/documentation"
- name: Upload docs artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'website'
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4