|
1 |
| -name: Update Frontmatter |
| 1 | +# name: Update Frontmatter |
2 | 2 |
|
3 |
| -on: |
4 |
| - push: |
5 |
| - branches: |
6 |
| - - 'main' |
7 |
| - paths: |
8 |
| - - 'content/docs/**/*.md' |
9 |
| - - '!content/docs/README.md' # Exclude the README.md file |
10 |
| - - '!content/docs/shared-content/**/*.md' # Exclude the shared-content folder |
| 3 | +# on: |
| 4 | +# push: |
| 5 | +# branches: |
| 6 | +# - 'main' |
| 7 | +# paths: |
| 8 | +# - 'content/docs/**/*.md' |
| 9 | +# - '!content/docs/README.md' # Exclude the README.md file |
| 10 | +# - '!content/docs/shared-content/**/*.md' # Exclude the shared-content folder |
11 | 11 |
|
12 |
| -permissions: |
13 |
| - contents: read |
| 12 | +# permissions: |
| 13 | +# contents: read |
14 | 14 |
|
15 |
| -jobs: |
16 |
| - update-date: |
17 |
| - permissions: |
18 |
| - contents: write # for Git to git push |
19 |
| - runs-on: ubuntu-latest |
20 |
| - if: ${{ !contains(github.event.head_commit.message, 'auto-update') }} |
| 15 | +# jobs: |
| 16 | +# update-date: |
| 17 | +# permissions: |
| 18 | +# contents: write # for Git to git push |
| 19 | +# runs-on: ubuntu-latest |
| 20 | +# if: ${{ !contains(github.event.head_commit.message, 'auto-update') }} |
21 | 21 |
|
22 |
| - steps: |
23 |
| - - name: Harden the runner (Audit all outbound calls) |
24 |
| - uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 |
25 |
| - with: |
26 |
| - egress-policy: audit |
| 22 | +# steps: |
| 23 | +# - name: Harden the runner (Audit all outbound calls) |
| 24 | +# uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 |
| 25 | +# with: |
| 26 | +# egress-policy: audit |
27 | 27 |
|
28 |
| - - name: Checkout repository |
29 |
| - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 |
30 |
| - with: |
31 |
| - fetch-depth: 2 |
32 |
| - token: ${{ secrets.ACCESS_TOKEN }} |
33 |
| - # ACCESS_TOKEN is a personal access token with repo scope |
34 |
| - # it needs to be updated in the repo secrets when it expires - Nov 10, 2024 |
| 28 | +# - name: Checkout repository |
| 29 | +# uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 |
| 30 | +# with: |
| 31 | +# fetch-depth: 2 |
| 32 | +# token: ${{ secrets.ACCESS_TOKEN }} |
| 33 | +# # ACCESS_TOKEN is a personal access token with repo scope |
| 34 | +# # it needs to be updated in the repo secrets when it expires - Nov 10, 2024 |
35 | 35 |
|
36 |
| - - name: Set up Node.js |
37 |
| - uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2 |
38 |
| - with: |
39 |
| - node-version: 18 |
| 36 | +# - name: Set up Node.js |
| 37 | +# uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2 |
| 38 | +# with: |
| 39 | +# node-version: 18 |
40 | 40 |
|
41 |
| - - name: Get list of modified files |
42 |
| - id: get-modified-files |
43 |
| - run: | |
44 |
| - modified_files=$(git diff --name-only HEAD^ HEAD | grep '^content/docs/.*\.md$' | xargs) |
45 |
| - echo "Modified files: $modified_files" |
46 |
| - if [ -z "$modified_files" ]; then |
47 |
| - echo "No modified Markdown files to update." |
48 |
| - exit 0 |
49 |
| - fi |
50 |
| - echo "modified_files=$modified_files" >> $GITHUB_OUTPUT |
| 41 | +# - name: Get list of modified files |
| 42 | +# id: get-modified-files |
| 43 | +# run: | |
| 44 | +# modified_files=$(git diff --name-only HEAD^ HEAD | grep '^content/docs/.*\.md$' | xargs) |
| 45 | +# echo "Modified files: $modified_files" |
| 46 | +# if [ -z "$modified_files" ]; then |
| 47 | +# echo "No modified Markdown files to update." |
| 48 | +# exit 0 |
| 49 | +# fi |
| 50 | +# echo "modified_files=$modified_files" >> $GITHUB_OUTPUT |
51 | 51 |
|
52 |
| - - name: Install packages |
53 |
| - run: npm ci |
| 52 | +# - name: Install packages |
| 53 | +# run: npm ci |
54 | 54 |
|
55 |
| - - name: Run update script |
56 |
| - run: node src/scripts/update-frontmatter.js ${{ steps.get-modified-files.outputs.modified_files }} |
| 55 | +# - name: Run update script |
| 56 | +# run: node src/scripts/update-frontmatter.js ${{ steps.get-modified-files.outputs.modified_files }} |
57 | 57 |
|
58 |
| - - name: Commit changes |
59 |
| - run: | |
60 |
| - git config user.name "GitHub Action" |
61 |
| - git config user.email "[email protected]" |
62 |
| - export HUSKY=0 |
63 |
| - git add -A |
64 |
| - # Check for meaningful changes before committing |
65 |
| - if [ -n "$(git status --porcelain)" ]; then |
66 |
| - # Commit only modified markdown files, not all changes |
67 |
| - git commit -m "chore: update frontmatter date (auto-update)" ${{ steps.get-modified-files.outputs.modified_files }} |
68 |
| - echo "Changes committed" |
69 |
| - else |
70 |
| - echo "No significant changes to commit" |
71 |
| - exit 0 |
72 |
| - fi |
| 58 | +# - name: Commit changes |
| 59 | +# run: | |
| 60 | +# git config user.name "GitHub Action" |
| 61 | +# git config user.email "[email protected]" |
| 62 | +# export HUSKY=0 |
| 63 | +# git add -A |
| 64 | +# # Check for meaningful changes before committing |
| 65 | +# if [ -n "$(git status --porcelain)" ]; then |
| 66 | +# # Commit only modified markdown files, not all changes |
| 67 | +# git commit -m "chore: update frontmatter date (auto-update)" ${{ steps.get-modified-files.outputs.modified_files }} |
| 68 | +# echo "Changes committed" |
| 69 | +# else |
| 70 | +# echo "No significant changes to commit" |
| 71 | +# exit 0 |
| 72 | +# fi |
73 | 73 |
|
74 |
| - - name: Pull latest changes |
75 |
| - run: git pull --rebase |
| 74 | +# - name: Pull latest changes |
| 75 | +# run: git pull --rebase |
76 | 76 |
|
77 |
| - - name: Push changes |
78 |
| - run: git push origin HEAD:main |
79 |
| - env: |
80 |
| - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
| 77 | +# - name: Push changes |
| 78 | +# run: git push origin HEAD:main |
| 79 | +# env: |
| 80 | +# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
0 commit comments