Skip to content

Commit ce57304

Browse files
committed
Ok
1 parent e1765d8 commit ce57304

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,40 @@ name: Deploy MkDocs
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- main
77

88
jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
token: ${{ secrets.ACCESS_TOKEN }}
16+
1317
- name: Set up Python
1418
uses: actions/setup-python@v4
1519
with:
1620
python-version: '3.x'
21+
1722
- name: Install dependencies
1823
run: |
1924
python -m pip install --upgrade pip
2025
pip install mkdocs
2126
# Add any other themes or plugins you need
2227
pip install mkdocs-material
28+
29+
- name: Create CNAME file
30+
run: echo "docs.allez.xyz" > ./docs/CNAME
31+
2332
- name: Configure Git
2433
run: |
2534
git config --global user.name "GitHub Actions"
2635
git config --global user.email "[email protected]"
36+
2737
- name: Deploy documentation
38+
env:
39+
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2840
run: |
29-
mkdocs gh-deploy --force
30-
# Create a CNAME file in the site directory
31-
echo "docs.allez.xyz" > ./site/CNAME
32-
# Force push to gh-pages branch
33-
cd site
34-
git init
35-
git add .
36-
git commit -m "Deploy documentation updates"
37-
git push --force https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} main:gh-pages
41+
mkdocs gh-deploy --force

0 commit comments

Comments
 (0)