Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
fix worflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Apr 11, 2022
1 parent b7fd3fe commit 67d62f1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
name: ci
on:
push:
branches:
- master
- main
workflow_dispatch

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
Expand All @@ -30,9 +13,10 @@ jobs:

- name: obs2mk source files
run: |
pip install git+https://github.com/Mara-Li/mkdocs_obsidian_publish.git@github-actions
pip install obs2mk
for f in ${{ github.workspace}}/source/*
do
echo $f
if [[ "$f" == *md ]]
then
obs2mk --GA --keep file "$f"
Expand All @@ -43,8 +27,15 @@ jobs:
run: rm ${{github.workspace}}/source/*
- name: Push new files
run: |
git pull
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
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v3
with:
path: requirements.txt
- name: Build mkdocs
run: mkdocs gh-deploy --force --clean
6 changes: 1 addition & 5 deletions .github/workflows/mkdocs_build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# This is a basic workflow to help you get started with Actions

name: mkdocs build

on:
workflow_run:
workflows: [ci]
types: [completed]
push

jobs:
deploy:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vscode/settings.json
.vscode/settings.json
desktop.ini

0 comments on commit 67d62f1

Please sign in to comment.