File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ # ⚠️ This workflow deploys docs to explodinglabs.com
2
+ # It is active only in the official repo. Forks won't trigger deployment.
3
+ name : Build and Deploy MkDocs
4
+
5
+ on :
6
+ push :
7
+ branches :
8
+ - main # or your main development branch
9
+
10
+ jobs :
11
+ deploy :
12
+ if : github.repository == 'explodinglabs/jsonrpcserver'
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout source repo
17
+ uses : actions/checkout@v3
18
+
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v4
21
+ with :
22
+ python-version : 3.x
23
+
24
+ - name : Install dependencies
25
+ run : pip install mkdocs mkdocs-material
26
+
27
+ - name : Build MkDocs site
28
+ run : mkdocs build
29
+
30
+ - name : Clone target repo
31
+ run : |
32
+ git clone https://x-access-token:${{ secrets.TARGET_REPO_PAT }}@github.com/explodinglabs/explodinglabs.com.git target-repo
33
+ rm -rf target-repo/$(basename "$GITHUB_REPOSITORY")
34
+ mkdir -p target-repo/$(basename "$GITHUB_REPOSITORY")
35
+ cp -a site/. target-repo/$(basename "$GITHUB_REPOSITORY")/
36
+ env :
37
+ GIT_AUTHOR_NAME : GitHub Actions
38
+ GIT_COMMITTER_NAME : GitHub Actions
39
+ GIT_AUTHOR_EMAIL :
[email protected]
40
+ GIT_COMMITTER_EMAIL :
[email protected]
41
+
42
+ - name : Commit and push
43
+ run : |
44
+ cd target-repo
45
+ git config user.name "Exploding Labs Bot"
46
+ git config user.email "[email protected] "
47
+ git add .
48
+ git commit -m "Update site from docs source repo" || echo "No changes to commit"
49
+ git push
You can’t perform that action at this time.
0 commit comments