Skip to content

Bump actions/setup-python from 1 to 4 #94

Bump actions/setup-python from 1 to 4

Bump actions/setup-python from 1 to 4 #94

name: build and publish gh pages
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: build mkdocs and deploy to gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ln -sf ${GITHUB_WORKSPACE}/README.md ${GITHUB_WORKSPACE}/docs/index.md
git remote add gh-pages https://x-access-token:${GITHUB_TOKEN}@github.com/coolya/mps.rocks.git
git fetch gh-pages
mkdocs gh-deploy --clean -r gh-pages