Skip to content

Commit

Permalink
docs: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewww committed Sep 21, 2024
1 parent 0a471d7 commit 7c65c2b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy MkDocs
name: Deploy Markdown as Website

on:
push:
Expand Down
Binary file added docs/img/00-pages-setup-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 20 additions & 7 deletions docs/labs/00-pages-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ cd my-project
#### Configure MkDocs
Edit the mkdocs.yml file to customize your site. For example:
```
site_name: My Documentation
site_name: Cloud Lab Chronicles
site_url: https://matthewww.github.io/cloud-lab-chronicles/
docs_dir: ../docs
nav:
- Home: index.md
- Labs: labs/00-pages-setup.md
theme:
name: readthedocs
name: material
```
#### Add Your Markdown Files
Place your .md files in the docs directory. For example, `docs/index.md` will be your homepage.
Expand All @@ -65,7 +71,7 @@ This pushes your generated static site to the gh-pages branch of your GitHub rep
### Set Up GitHub Actions
Create a .github/workflows/ci.yml file in your repository with the following content:
```
name: Deploy MkDocs
name: Deploy Markdown as Website
on:
push:
Expand All @@ -78,23 +84,30 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install mkdocs mkdocs-material
pip install mkdocs mkdocs-material mkdocs-awesome-pages-plugin
- name: Deploy to GitHub Pages
run: |
mkdocs gh-deploy --force
```

With this setup, every time you push changes to the main branch, GitHub Actions will automatically build and deploy your site to GitHub Pages. This way, you don’t need to manually run mkdocs gh-deploy each time.
Every time you push changes to the main branch, GitHub Actions will automatically build and deploy your site to GitHub Pages. This way, you don’t need to manually run mkdocs gh-deploy each time.

### Add GitHub Pages Extension to VS Code

Rather than going to Actions in GitHub to see workflow runs, you can do this directly in VS Code. Noice!

![GitHub Actions in VS Code](../../docs/img/00-pages-setup-1.png)

## Lab files

Expand Down

0 comments on commit 7c65c2b

Please sign in to comment.