Skip to content

Some fixed before adding new stuff (#223) #274

Some fixed before adding new stuff (#223)

Some fixed before adding new stuff (#223) #274

Workflow file for this run

name: Publish docs
on:
push:
branches:
- master
tags:
- v*
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --quiet --requirement requirements.txt
python -m pip list
- name: Generate README
run: |
cp README.md README.bak
python make_md.py
if [[ "$(diff README.md README.bak)" ]]; then
echo "ERROR: README is out of sync with HEPML.bib"
echo " run make_md.py and commit changes"
exit 1
fi
- name: Add build info footnote to jheppub.sty
run: |
python footnote_build_info.py
- name: Compile LaTeX document
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make
make document
- name: Upload PDF artifact
uses: actions/upload-artifact@v3
with:
name: hepml-review
path: HEPML.pdf
- name: Setup mkdocs 1
uses: actions/checkout@v3
- name: Setup mkdocs 2
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- name: Setup mkdocs 3
uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Deploy mkdocs
run: mkdocs gh-deploy --force
- name: Checkout gh-pages branch
run: |
git checkout gh-pages
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global --add safe.directory /github/workspace
- name: Download HEP review pdf
uses: actions/download-artifact@v3
with:
name: hepml-review
- name: Add HEP review pdf to gh-page
run: |
mkdir -p assets
cp HEPML.pdf assets/hepml_review.pdf
git add -f assets/hepml_review.pdf
git status
git commit -m "Update pdf"
git status
git push --set-upstream origin gh-pages