Skip to content

Merge pull request #49 from ndy2/48-exclude-html-from-being-converted… #88

Merge pull request #49 from ndy2/48-exclude-html-from-being-converted…

Merge pull request #49 from ndy2/48-exclude-html-from-being-converted… #88

Workflow file for this run

name: ci
on:
push:
branches:
- main
workflow_dispatch:
jobs:
test:
name: run pytest
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Set up Python 3 ⚙️ 🐍
uses: actions/setup-python@v2
# run pytest
- run: pip install -r requirements.txt
- run: cd test; python -m pytest
# create & archive artifact
- run: python setup.py sdist
- name: Archive artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: |
dist
!dist/**/*.md
release:
name: Upload release to PyPI and Deploy Github Pages
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mkdocs-obsidian-support-plugin
permissions: write-all
steps:
# retrieve artifact here
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: dist
- run: mkdir dist; mv mkdocs-obsidian-support-plugin-*.tar.gz dist
# publish it to pypi
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
gh-pages:
name: Deploy Github Pages
needs: release
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Set up Python 3 ⚙️ 🐍
uses: actions/setup-python@v2
- run: pip install -r requirements.txt
# deploy github pages
- run: pip install mkdocs-material
- run: pip install mkdocs-glightbox
- run: pip install mkdocs-awesome-pages-plugin
- run: pip install mkdocs-obsidian-support-plugin
- run: mkdocs gh-deploy --force