-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,36 +18,13 @@ jobs: | |
with: | ||
node-version: '14' | ||
|
||
- name: Save current file list | ||
id: save_file_list | ||
run: | | ||
git ls-files > before_files.txt | ||
- name: Generate sitemap | ||
run: node utils/generate-sitemap.js | ||
|
||
- name: List affected files | ||
run: | | ||
git ls-files > after_files.txt | ||
git diff --name-only > affected_files.txt | ||
echo "Changed files:" | ||
cat affected_files.txt | ||
- name: Configure Git | ||
- name: Commit sitemap | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
- name: Commit affected files | ||
run: | | ||
git add affected_files.txt | ||
git commit -m "Commit affected files" || true | ||
- name: Pull changes | ||
run: git pull --rebase | ||
|
||
- name: Print affected files | ||
if: success() | ||
run: | | ||
echo "The following files were affected by the change:" | ||
cat affected_files.txt | ||
git add sitemap.xml | ||
git commit -m ":construction_worker: Update sitemap.xml" || true | ||
git push origin main |