Skip to content
This repository has been archived by the owner on Sep 5, 2022. It is now read-only.

Commit

Permalink
docs(ci): Update workflow for actions obs2mk
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Apr 11, 2022
1 parent 5f9095b commit e5d1a79
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,31 +153,47 @@ on:
branches:
- master
- main
jobs:
path-filter:
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.filter.outputs.sources }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
sources:
- 'source/**'
obs2mk:
runs-on: ubuntu-latest
needs: path-filter
if: needs.path-filter.outputs.output1 == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.10.2
- name: obs2mk source files
run: |
pip install obs2mk
pip install git+https://github.com/Mara-Li/mkdocs_obsidian_publish.git@github-actions
for f in ${{ github.workspace}}/source/*
do
if [[ "$f" == *md ]]
then
obs2mk --GA --keep file $f
obs2mk --GA --keep file "$f"
fi
done
obs2mk --GA clean
- name: clean source files
run: rm ${{github.workspace}}/source/*
- name: Push new files
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git config --global user.name 'mara-li'
git config --global user.email 'mara-li@users.noreply.github.com'
git add .
git commit -am "Updated blog 🎉"
git push
Expand Down

0 comments on commit e5d1a79

Please sign in to comment.