-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.21 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy MkDocs site
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Python environment
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11' # Use the appropriate Python version
# Step 3: Install MkDocs and plugins
- name: Install dependencies
run: |
pip install mkdocs
pip install mkdocs-simple-blog
pip install ghp-import # Required for deployment
# Step 4: Build the MkDocs site
- name: Build MkDocs site
run: mkdocs build
# Step 5: Copy CNAME to the build directory
- name: Copy CNAME file
run: |
echo "2024.newspeak.house" > site/CNAME
working-directory: ${{ github.workspace }}
# Step 6: Confirm CNAME file is present
- name: Check CNAME file
run: cat site/CNAME
# Step 7: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force --remote-branch gh-pages
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}