File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-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/superstack'
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 mkdocs-mermaid2-plugin
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+ cp -r site/* target-repo/
34+ env :
35+ GIT_AUTHOR_NAME : GitHub Actions
36+ GIT_COMMITTER_NAME : GitHub Actions
37+ GIT_AUTHOR_EMAIL : actions@github.com
38+ GIT_COMMITTER_EMAIL : actions@github.com
39+
40+ - name : Commit and push
41+ run : |
42+ cd target-repo
43+ git add .
44+ git commit -m "Update site from docs source repo" || echo "No changes to commit"
45+ git push
You can’t perform that action at this time.
0 commit comments