diff --git a/.github/workflows/copy-files-from-til.yml b/.github/workflows/copy-files-from-til.yml index 3a897469..2ad329b2 100644 --- a/.github/workflows/copy-files-from-til.yml +++ b/.github/workflows/copy-files-from-til.yml @@ -8,13 +8,17 @@ on: jobs: copy_files: + env: + destination: src/content/docs/TIL runs-on: ubuntu-latest steps: - - name: Clone repository + - name: Checkout repository uses: actions/checkout@v2 - with: - repository: rlaisqls/TIL + + - name: Clone repository + run: | + git clone --branch main https://github.com/rlaisqls/TIL.git - name: Add labels run: | @@ -35,18 +39,27 @@ jobs: mv tmpfile "$file" elif [ -d "$file" ]; then - add_text_to_files "$dir/$file" + add_labels_to_files "$dir/$file" cd "$dir" fi done } - add_labels_to_files TIL + ls + ls ../ + cd TIL + pwd + add_labels_to_files $(pwd) - name: Copy files run: | - cp -r TIL/* src/content/docs/TIL - rm src/content/docs/TIL/README.md + pwd + echo "" + + rm -rf ${{ env.destination }} + mkdir ${{ env.destination }} + cp -r TIL/* ${{ env.destination }} + rm ${{ env.destination }}/README.md rm -rf TIL - name: Checkout repository @@ -56,5 +69,13 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: "Copy files from TIL" + repository: . + branch: main + file_pattern: '.' + push_options: '--force' + commit_options: '--no-verify --signoff' + commit_user_name: rlaisqls + commit_user_email: rlaisqls@gmail.com + commit_author: rlaisqls env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/astro.config.mjs b/astro.config.mjs index 75191bca..2df7b512 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -23,7 +23,7 @@ export default defineConfig({ }, { label: 'TIL', - autogenerate: { directory: 'TIL/개발', collapsed: true }, + autogenerate: { directory: 'TIL', collapsed: true }, } ], customCss: ['./src/tailwind.css'],