-
-
Notifications
You must be signed in to change notification settings - Fork 35
42 lines (38 loc) · 1.05 KB
/
mkdocs-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
name: Push docs to PurpurWebsite
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '**.md'
- 'mkdocs/**'
- 'mkdocs.yml'
- '**.js'
- '**.html'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9.16'
- name: Build docs
run: |
pip install -r requirements.txt
mkdocs build -d docs
- name: Push to PurpurWebsite repo
uses: granny/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'docs'
destination_repo: 'PurpurMC/PurpurWebsite'
destination_folder: 'public'
destination_branch: master
user_email: '41898282+github-actions[bot]@users.noreply.github.com'
user_name: 'github-actions'
commit_message: "Update from ${GITHUB_REPOSITORY}@${GITHUB_SHA:0:7}"