Processed Markdown files using obs3dian #33
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: Process Markdown Files with Obs3dian | |
on: | |
push: | |
paths: | |
- "**.md" | |
jobs: | |
process-markdown: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install obs3dian Python package | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install obs3dian==0.3.3 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Process Markdown files with obs3dian | |
run: | | |
obs3dian run . --overwrite --bucket-name=csstudy \ | |
--aws-access-key=${{ secrets.AWS_ACCESS_KEY_ID }} \ | |
--aws-secret-key=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ | |
--output-folder-path=. --image-folder-path=. | |
- name: Commit processed files | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
git add . | |
git commit -m "Processed Markdown files using obs3dian" || echo "No changes to commit" | |
- name: Push changes to GitHub | |
uses: ad-m/github-push-action@v0.6.0 | |
with: | |
github_token: ${{ secrets.PERSONAL_TOKEN }} | |
branch: ${{ github.ref_name }} # 현재 브랜치로 푸시 |