Skip to content

Commit 6823de2

Browse files
Fixed the deployment issue by changing the deployment method to github actions and no environment variable check. Modified the readme file to include trouble shooting and proper setup instructions
1 parent 821c506 commit 6823de2

1 file changed

Lines changed: 61 additions & 2 deletions

File tree

README.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,61 @@
1-
# PreTeXt-codespace
2-
This repository is created to make getting started with PreTeXt as easy as spinning a codespace on this repository.
1+
# PreTeXt Codespace
2+
3+
This repository is designed to help you quickly get started with [PreTeXt](https://pretextbook.org) by launching a GitHub Codespace. The following steps will guide you through building and deploying your PreTeXt project.
4+
5+
---
6+
7+
## 🚀 Quick Start Guide
8+
Once the Codespace has finished creating, **check that PreTeXt is installed** by running:
9+
10+
```bash
11+
pretext --version
12+
```
13+
If you see an error like **command not found**, follow these steps:
14+
15+
1. **Reload the VS Code Window**
16+
- Press `Ctrl+Shift+P` → type `Reload Window` → hit Enter.
17+
18+
2. **Kill the Existing Terminal (if open)**
19+
- Click the trash icon in the terminal panel or run `Terminal: Kill Terminal` from the command palette.
20+
21+
3. **Open a New Terminal**
22+
- Press `Ctrl+Shift+\`` (backtick) or go to *Terminal → New Terminal*.
23+
24+
4. **Build the Project**
25+
- Run:
26+
```bash
27+
pretext build web
28+
```
29+
30+
5. **Preview with CodeChat**
31+
- Use [CodeChat](https://github.com/PreTeXtBook/pretext-cli/wiki/Live-preview-with-CodeChat) for live preview:
32+
```bash
33+
codechat serve
34+
```
35+
36+
6. **Deploy to GitHub Pages**
37+
- Run:
38+
```bash
39+
pretext deploy --pages
40+
```
41+
- Deployment will also be triggered when changes are pushed to the default (main) branch.
42+
- If you encounter that github pages is not being deployed follow the instruction below:
43+
44+
---
45+
46+
## 🌐 GitHub Pages Configuration
47+
48+
Make sure to configure GitHub Pages to use **GitHub Actions** as the build and deployment source.
49+
50+
1. Go to your repository's **Settings** → **Pages**.
51+
2. Under **Build and deployment**, set the source to **GitHub Actions** as shown below:
52+
53+
![GitHub Pages Source](README_images/image-pages_source.png)
54+
55+
---
56+
57+
## ⏱ Deployment Time
58+
59+
Deployment takes about **4 minutes**. After triggering the deployment, wait a few minutes, then check your site via the GitHub Pages link.
60+
61+
![GitHub Actions Deployment](README_images/image-actions-deployment.png)

0 commit comments

Comments
 (0)