changed at Tue Apr 23 09:37:52 UTC 2024 #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-and-push-to-static-site-repo | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_job: | |
runs-on: ubuntu-20.04 | |
name: Build documentation | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install native dependencies | |
run: sudo apt-get update -y && sudo apt-get install -y ditaa graphviz | |
- name: Install pip dependencies | |
run: sudo pip install Sphinx==1.6.7 sphinx_rtd_theme==1.3.0 hieroglyph==1.0 | |
- name: Build documentation | |
run: cd tools/labs && make docs | |
- name: checkout linux-kernel-labs-zh/linux-kernel-labs-zh.github.io site | |
uses: actions/checkout@v2 | |
with: | |
repository: linux-kernel-labs-zh/linux-kernel-labs-zh.github.io | |
path: site | |
token: ${{ secrets.DEPLOY_KEY }} | |
- name: Copy generated site | |
run: cp -r Documentation/output/teaching/* site | |
- name: Commit and push changes | |
run: | | |
cd site | |
git config user.name 'deployBot' | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Deploy at $(date -u)" | |
git push |