-
Notifications
You must be signed in to change notification settings - Fork 26
45 lines (44 loc) · 1.48 KB
/
deploy_homepage.yaml
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
43
44
45
name: Deploy homepage
on:
push:
branches:
- master
paths:
- 'docs/**'
- 'zeus/**'
- 'mkdocs.yml'
- 'Dockerfile'
- '.github/workflows/deploy_homepage.yaml'
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
cache: 'pip'
- name: Install mkdocs-material-insiders
env:
GH_TOKEN: ${{ secrets.MKDOCS_MATERIAL_INSIDERS_PAT }}
run: pip install git+https://${GH_TOKEN}@github.com/jaywonchung/mkdocs-material-insiders.git
- name: Install other homepage dependencies
run: pip install -r docs/requirements.txt
- name: Build homepage
run: mkdocs build
- name: Generate a small README for ml-energy/zeus
run: echo -e "# Zeus Homepage\nGo to https://github.com/SymbioticLab/Zeus for the main Zeus repository." > site/README.md
- name: Push the built homepage to ml-energy/zeus
uses: cpina/github-action-push-to-another-repository@v1.5
env:
SSH_DEPLOY_KEY: ${{ secrets.ML_ENERGY_ZEUS_SSH_KEY }}
with:
source-directory: site
destination-github-username: ml-energy
destination-repository-name: zeus
user-name: Jae-Won Chung
user-email: jwnchung@umich.edu
target-branch: master