Merge pull request #34 from maling-it/dependabot/github_actions/actio… #15
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: documentation | |
on: | |
push: | |
branches: | |
- main | |
env: | |
PYTHON_VERSION: 3.x | |
permissions: | |
contents: write | |
jobs: | |
documentation: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python runtime | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Set up build cache | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
key: ${{ runner.os }}-${{ hashFiles('.cache/**') }} | |
path: .cache | |
- name: Install Python dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Deploy documentation | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} | |
run: | | |
git config --local user.email "mdswa@zxce3.net" | |
git config --local user.name "Mandakara Sadewa" | |
git config --global commit.gpgsign true | |
mkdocs gh-deploy --force | |
mkdocs --version |