add operating system lecture materials #470
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 Docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- run: | | |
python -m pip install --upgrade pip | |
- name: (ROOT) Install dependencies & Run root README build script | |
run: | | |
cd .github/readme_builder | |
sh dependencies.sh | |
ruby app.rb | |
- name: (BOJ) Install dependencies & Run BOJ README build script | |
run: | | |
cd tasks/online_judge/baekjoon/.github/stat | |
pip install -r requirements.txt | |
python app.py | |
- name: Commit build | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
diffs=$(git diff tasks/online_judge/baekjoon/README.md) | |
[ "$diffs" != "null" -a -n "$diffs" ] && git add . || echo "No diffs. Progress skipped." | |
[ "$diffs" != "null" -a -n "$diffs" ] && git commit -m "Build document" -m "`date`" || echo "No diffs. Progress skipped." | |
[ "$diffs" != "null" -a -n "$diffs" ] && git push || echo "No diffs. Progress skipped." |