Skip to content

Commit 2c839da

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

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
deploy:
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Build docs
31+
working-directory: ./docs
32+
run: mkdocs build
33+
- name: Setup Pages
34+
if: github.event_name != 'pull_request'
35+
uses: actions/configure-pages@v5
36+
- name: Upload artifact
37+
if: github.event_name != 'pull_request'
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: ./docs/site/
41+
- name: Deploy to GitHub Pages
42+
if: github.event_name != 'pull_request'
43+
id: deployment
44+
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)