Skip to content

Pages

Pages #48

Workflow file for this run

name: Pages
on:
workflow_run:
workflows: [ "Tests" ]
branches: [ main ]
types:
- completed
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
pages:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: write
pages: write
id-token: write
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Set Timezone to Europe/Oslo
uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Oslo"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Create demo
run: |
python .github/demobuilder.py
cp -r BookingSystem/static ./demo
sed -i 's/\/static/\/FeideUtstyrbase\/static/g' demo/static/css/font-awesome.min.css
- name: Build mkdocs
run: |
mkdocs build
mkdir ./demo/docs
cp -r ./site/* ./demo/docs
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v1
with:
artifact-name: github-pages
path: ./demo
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1