Skip to content

Commit 6e9b772

Browse files
authored
Merge pull request #40 from UBC-MDS/ali-docs
fixing docs
2 parents 3379114 + 496de7b commit 6e9b772

3 files changed

Lines changed: 54 additions & 3 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Quarto Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
publish-docs:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up conda environment
21+
uses: conda-incubator/setup-miniconda@v3
22+
with:
23+
environment-file: environment.yml
24+
activate-environment: tame_your_files_env
25+
auto-activate-base: false
26+
27+
- name: Set up Quarto
28+
uses: quarto-dev/quarto-actions/setup@v2
29+
30+
- name: Install package
31+
shell: bash -l {0}
32+
run: python -m pip install -e .
33+
34+
- name: Render Quarto site
35+
shell: bash -l {0}
36+
run: quarto render docs
37+
38+
- name: Publish to gh-pages
39+
uses: peaceiris/actions-gh-pages@v4
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: docs/_site
43+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ instance/
155155
# Sphinx documentation
156156
docs/_build/
157157
docs/api
158+
docs/_site/
158159

159160
# PyBuilder
160161
.pybuilder/

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ quarto render docs
4444

4545
## Deploying documentation (automated)
4646

47-
![Build Status](https://github.com/UBC-MDS/group_16_tame_your_files.git/actions/workflows/publish-test-pypi.yml/badge.svg)
48-
Documentation is built and deployed automatically to GitHub Pages via GitHub Actions.
49-
Live site: https://github.com/UBC-MDS/group_16_tame_your_files
47+
Documentation is built by GitHub Actions and published to the `gh-pages` branch.
48+
To enable GitHub Pages:
49+
50+
1. Go to `Settings``Pages`.
51+
2. Set **Source** to **Deploy from a branch**.
52+
3. Select branch `gh-pages` and folder `/(root)`, then save.
53+
4. After the first workflow run, the Pages URL will appear on the same screen.
54+
55+
To force a rebuild, run the `quarto-publish` workflow from the **Actions** tab
56+
using **Run workflow**.

0 commit comments

Comments
 (0)