Skip to content

Merge pull request #106 from mbrg/bf-analytics #85

Merge pull request #106 from mbrg/bf-analytics

Merge pull request #106 from mbrg/bf-analytics #85

Workflow file for this run

name: Release Action
on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
versioning:
runs-on: ubuntu-latest
outputs:
semver: ${{ steps.gitversion.outputs.semver }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# In order for the GitVersion to properly work you need to clone the repository with the entire history
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: "5.x"
- name: Install GitVersion
uses: gittools/actions/gitversion/execute@v1.1.1
id: gitversion
- name: Output version to log
run: echo "Version ${{ steps.gitversion.outputs.semver }}"
build:
runs-on: ubuntu-latest
needs: versioning
env:
MDBOOK_VERSION: 0.4.36
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install mdBook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
chmod +x bin/mdbook
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Generate Markdown
run: python build_scripts/generate_content_as_md.py --version ${{ needs.versioning.outputs.semver }} --debug
- name: Customize book theme
run: |
mkdir -p build/theme
cp book_theme/head.hbs build/theme/head.hbs
- name: Build with mdBook
run: bin/mdbook build
- name: Rewrite edit links
run: python build_scripts/rewrite_mdbook_links.py --book-dir book/ --debug
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./book
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4