updated storage example #484
Workflow file for this run
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 Documentation using MkDocs | |
# Controls when the action will run. Triggers the workflow on push events on main branch | |
# but pull request events on any branch but deployement happens only for the main branch | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build Documentation | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- name: Checkout Main | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies and setup git config | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Clean Build | |
run: | | |
mkdocs build --clean | |
deploy: | |
name: Deploy Documentation | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
# this part will only run if the PR has been merged | |
# if: github.event.pull_request.merged == true | |
# this part will only run if the branch or tag ref | |
# that triggered the workflow is main i.e. pushed or PR merged in main | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout Main | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies and setup git config | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Deploy | |
run: | | |
mkdocs gh-deploy --force |