From 77d693d8510f2e8f26a8ad2c3cc931b3268d1a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EB=AA=85=EC=A7=84?= Date: Sun, 28 Jul 2024 00:39:36 +0900 Subject: [PATCH] Add action yaml Add obs3dian action --- .github/workflows/action.yaml | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/action.yaml diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml new file mode 100644 index 0000000..4fb44a5 --- /dev/null +++ b/.github/workflows/action.yaml @@ -0,0 +1,72 @@ +name: Process Markdown Files with Obs3dian + +on: + push: + paths: + - '**/*.md' + +jobs: + install: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install AWS CLI + run: | + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install obs3dian + + config: + runs-on: ubuntu-latest + needs: install + steps: + - name: Configure AWS CLI + run: | + mkdir -p ~/.aws + echo "[obs3dian]" > ~/.aws/credentials + echo "aws_access_key_id = ${{ secrets.AWS_ACCESS_KEY_ID }}" >> ~/.aws/credentials + echo "aws_secret_access_key = ${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> ~/.aws/credentials + echo "[obs3dian]" > ~/.aws/config + echo "region = ${{ secrets.AWS_DEFAULT_REGION }}" >> ~/.aws/config + + - name: Configure Obs3dian + run: | + obs3dian config <