Skip to content

Clear the previous production branch #5

Clear the previous production branch

Clear the previous production branch #5

Workflow file for this run

name: MkDocs Build + Deploy
on:
push:
branches:
- main # Set the branch you want to trigger the workflow on
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material pymdown-extensions
- name: Build MkDocs
run: mkdocs build --clean
- name: Create and force push to documentation branch
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git branch --delete production
git checkout -b production # Replace 'documentation' with the desired branch name
find . -type f ! -regex '^./site\(/.*\)?' ! -name '.*' -exec echo {} +
find . -type f ! -regex '^./site\(/.*\)?' ! -name '.*' -exec rm -f {} +
# rm -rf docs
mv site docs
git add .
git commit -m "Content update"
git push --force origin production