still there is some bugs! #16
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 Deploy Docs | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Making log files readable and put them in docs | |
run: | | |
cnt=0 | |
for file in records/*; do | |
cnt=$((cnt + 1)) | |
python log-to-readable-md.py "$file" | |
cp new.md docs/records/"$cnt".md | |
done | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- run: pip install mkdocs-material | |
- run: mkdocs gh-deploy --force |