Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Merge branch 'main' of github.com:MiguelGuthridge/FL-Studio-API-Stubs #21

Merge branch 'main' of github.com:MiguelGuthridge/FL-Studio-API-Stubs

Merge branch 'main' of github.com:MiguelGuthridge/FL-Studio-API-Stubs #21

Workflow file for this run

name: Generate documentation and deploy to GitHub pages
on:
# Documentation can be either manually updated or is automatically updated when pushed to main branch
workflow_dispatch:
push:
branches:
- main
# Make sure deploy-pages has necessary permissions to deploy to GitHub Pages
permissions:
pages: write
id-token: write
# Cancel older deploy workflow when more than one is running
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
name: Build and deploy documentation site
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }} # Output URL after the workflow has finished
steps:
# Checkout repository including submodules
- name: Checkout
id: checkout
uses: actions/checkout@v3
with:
submodules: true
# Setup Python 3.9
- name: Setup Python
id: python
uses: actions/setup-python@v4
with:
python-version: '3.9'
# Install dependencies using Poetry
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- run: poetry --version
- run: poetry install
# Build documentation to ./site/ directory
- name: Build Documentation
id: build
run: poetry run python -m scripts.build_docs
# Upload artifact from the ./site/ directory using the expected format for GitHub Pages
- name: Upload Artifact
id: upload
uses: actions/upload-pages-artifact@v1
with:
path: ./site/
# Use previously uploaded artifact to deploy to GitHub Pages
- name: Deploy
id: deploy
uses: actions/deploy-pages@v1