Skip to content

Commit 05e2ca1

Browse files
authored
Merge pull request #17 from ybw0014/feat/gh-actions
feat: setup CI
2 parents 4f21ee2 + 9b66e77 commit 05e2ca1

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches: [ main ]
5+
workflow_dispatch:
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@2e3e4b15a884dc73a63f962bff250a855150a234
17+
with:
18+
python-version: '3.13'
19+
cache: 'pip'
20+
pip-install: -r requirements.txt
21+
22+
- name: Build documentation
23+
run: mkdocs build
24+
25+
- name: Deploy to GitHub Pages
26+
uses: peaceiris/actions-gh-pages@4b09552702d0b65573696410d4707c765da2630b
27+
with:
28+
personal_token: ${{ secrets.DOCS_DEPLOY_TOKEN }}
29+
external_repository: pylonmc/pylonmc.github.io
30+
publish_branch: master
31+
publish_dir: ./site
32+
user_name: 'github-actions[bot]'
33+
user_email: 'github-actions[bot]@users.noreply.github.com'
34+
commit_message: 'Deploy ${{ github.sha }}'

.github/workflows/pr-checker.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: PR Checker
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
check-build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@2e3e4b15a884dc73a63f962bff250a855150a234
17+
with:
18+
python-version: '3.13'
19+
cache: 'pip'
20+
pip-install: -r requirements.txt
21+
22+
- name: Check documentation build
23+
run: |
24+
mkdocs build --strict

0 commit comments

Comments
 (0)