깃허브 잘 하시는 분... yml

Lv.1 지상의별들 (61.♡.84.133)

2025년 7월 2일 PM 07:48 · 수정됨(20:10)

조회 409 공감 0

계속 오류가 나서 질문드립니다..

지금 상황은 pelican을 이용해서 깃허브 블로그를 사용하려고 하고 있습니다.

또한, gemini 를 사용해가면서 알아낸 것은 지금 들여쓰기 오류가 나타나고 있다는 건데요. 문제는 이게 하나를 고치면 다른 하나가 또 들여쓰기에 문제가 있다고 반복적으로 오류메시지가 나오고 있습니다. 

올린 내용을 보면 아래의 jobs: 부분에 들여쓰기 오류가 있다고 하고, gemini는 들여쓰기를 하면 안된다고 하는데... 보시면 아시겠지만 들여쓰기를 안 한 상태입니다. 해결 방법좀 알려주시길 부탁드립니다


name: Pelican CI/CD

on:
  # Trigger the workflow on push or pull request,
  # but only for the master branch
  push:
    branches:
      - main

jobs:    # 이 부분에서 들여쓰기 오류라고 나옵니다. / 해결 방법은 들여쓰기를 하지 말라고 하는데... 더 이상 들여쓰기를 안 할 수가 없음...
    build: # 4칸 들여쓰기를 하니 발생했던 들여쓰기 오류가 사라짐 -1 
    runs-on: ubuntu-latest
    permissions: # 4칸 들여쓰기를 하니 발생했던 들여쓰기 오류가 사라짐 -2 
        contents: write
        pages: write
        id-token: write

      - name: Configure Git Safe Directory
        run: |
          git config --global --add safe.directory /github/workspace/output
          git config --global --add safe.directory /github/workspace

    steps:
    - uses: actions/checkout@v3
    - uses: nelsonjchen/gh-pages-pelican-action@0.2.0
      env:
        GH_PAGES_BRANCH: gh-pages
        # GH_PAGES_CNAME: custom domain
        # PELICAN_CONFIG_FILE: pelicanconf.py
        PELICAN_CONFIG_FILE: publishconf.py
        # PELICAN_CONTENT_FOLDER: content
        PELICAN_THEME_FOLDER: PELICAN_THEME_FOLDER: pelican-themes/pelican-bootstrap3
        GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
        GH_PAGES_SAFE_DIRECTORY: true

댓글 (6)

  • xcode

    xcode Lv.1

    25.07.02 · 175.♡.24.98

    - name: Configure Git Safe Directory 부분이
    steps: 밑에 있어야 하는거 아닌가요? 저도 잘 모르는 부분이라...
  • 지상의별들 Lv.1 → xcode 작성자

    25.07.02 · 61.♡.84.133

    저는 git 은 이번에 처음 해봐서요;; 사실 저것도 다른 사람이 만든거를 가지고 해결 안되는 부분을 ai로 해결하면서 여기까지 온거라서요... 사실 뭐가 맞는 것인지 틀린 것인지를 모르겠어요..
  • 지상의별들 Lv.1 → xcode 작성자

    25.07.02 · 61.♡.84.133

    - name: Configure Git Safe Directory
    run: |
    git config --global --add safe.directory /github/workspace/output
    git config --global --add safe.directory /github/workspace

    이 부분이
    steps:
    아래로 내려가야 한다는 말씀이신거죠..?
  • xcode

    xcode Lv.1 → 지상의별들

    25.07.02 · 175.♡.24.98

    name: Pelican CI/CD
    on:
    # Trigger the workflow on push or pull request,
    # but only for the main branch
    push:
    branches:
    - main

    jobs:
    build:
    runs-on: ubuntu-latest
    permissions:
    contents: write
    pages: write
    id-token: write
    steps:
    - uses: actions/checkout@v3

    - name: Configure Git Safe Directory
    run: |
    git config --global --add safe.directory /github/workspace/output
    git config --global --add safe.directory /github/workspace

    - uses: nelsonjchen/gh-pages-pelican-action@0.2.0
    env:
    GH_PAGES_BRANCH: gh-pages
    # GH_PAGES_CNAME: custom domain
    # PELICAN_CONFIG_FILE: pelicanconf.py
    PELICAN_CONFIG_FILE: publishconf.py
    # PELICAN_CONTENT_FOLDER: content
    PELICAN_THEME_FOLDER: pelican-themes/pelican-bootstrap3
    GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
    GH_PAGES_SAFE_DIRECTORY: true
  • 지상의별들 Lv.1 → xcode 작성자

    25.07.02 · 61.♡.84.133

    감사합니다. 덕분에 yml 문제가 해결되었습니다
  • 지상의별들 Lv.1 → xcode 작성자

    25.07.02 · 61.♡.84.133

    이런식으로요

    steps:
    - uses: actions/checkout@v3
    - uses: nelsonjchen/gh-pages-pelican-action@0.2.0
    - name: Configure Git Safe Directory
    run: |
    git config --global --add safe.directory /github/workspace/output
    git config --global --add safe.directory /github/workspace

댓글을 작성하려면 이 필요합니다.