Skip to content

Commit f0845a0

Browse files
committed
Add build and deploy workflow
1 parent 1dc8d8f commit f0845a0

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build and deploy docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Install dependencies
28+
working-directory: ./docs
29+
run: pip install -r requirements.txt
30+
- name: Build docs
31+
working-directory: ./docs
32+
run: mkdocs build
33+
- name: Upload artifact
34+
if: github.event_name != 'pull_request'
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: ./docs/site/
38+
name: site
39+
deploy:
40+
needs: build
41+
if: github.event_name != 'pull_request' && github.ref_name == 'main'
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

docs/docs/deploy_infrastructure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Deploy Infrastructure

docs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
site_name: FRIDGE
33
repo_url: https://github.com/alan-turing-institute/fridge
44
edit_uri: blob/main/docs/docs/
5+
site_url: https://alan-turing-institute.github.io/fridge
56
copyright: >-
67
© The contributors.
78

0 commit comments

Comments
 (0)