@@ -29,64 +29,26 @@ jobs:
29
29
with :
30
30
python-version : " 3.x"
31
31
32
- - name : Authenticate with GCP
33
- uses : google-github-actions/auth@v1
34
- with :
35
- credentials_json : ${{ secrets.GCP_SA_KEY }}
36
-
37
32
- name : Install Dependencies
38
33
run : |
39
34
python -m pip install --upgrade pip
40
35
pip install -r requirements.txt
41
36
42
- - name : Dry run Audio Pipeline
43
- id : dry_run_audio
44
- run : |
45
- python audio-pipeline.py --task posts --n 10 --dry_run
46
-
47
- if [[ $(python audio-pipeline.py --task posts --n 10 --dry_run | grep "Total Markdown files to process" | awk '{print $8}') -gt 0 ]]; then
48
- echo "audio_updated=true" >> $GITHUB_OUTPUT
49
- else
50
- echo "audio_updated=false" >> $GITHUB_OUTPUT
51
- fi
52
-
53
- - name : Install FFmpeg
54
- if : steps.dry_run_audio.outputs.audio_updated == 'true'
55
- run : |
56
- sudo apt-get update
57
- sudo apt-get install -y ffmpeg
58
-
59
- - name : Run Audio Pipeline
60
- if : steps.dry_run_audio.outputs.audio_updated == 'true'
61
- run : |
62
- python audio-pipeline.py --task posts --n 10
63
-
64
- - name : Commit generated audio files
65
- if : steps.dry_run_audio.outputs.audio_updated == 'true'
66
- run : |
67
- git config user.name "github-actions[bot]"
68
- git config user.email "github-actions[bot]@users.noreply.github.com"
69
- git add .
70
- git diff --cached --quiet || git commit -m "Add generated audio files"
71
- git push
72
- env :
73
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74
-
75
37
- name : Output git diff
76
38
run : |
77
39
git diff --name-only HEAD~1 HEAD
78
-
40
+
79
41
- name : Dry run language files
80
42
id : dry_run_lang
81
43
run : |
82
44
export DEEPSEEK_API_KEY=${{ secrets.DEEPSEEK_API_KEY }}
83
45
DRY_RUN_OUTPUT=$(python scripts/update_lang.py --dry_run)
84
46
echo "$DRY_RUN_OUTPUT"
85
-
47
+
86
48
if [[ "$DRY_RUN_OUTPUT" == *'Total Markdown files to process: 0'* ]]; then
87
- echo "lang_updated=false" >> $GITHUB_OUTPUT
49
+ echo "lang_updated=false" >> " $GITHUB_OUTPUT"
88
50
else
89
- echo "lang_updated=true" >> $GITHUB_OUTPUT
51
+ echo "lang_updated=true" >> " $GITHUB_OUTPUT"
90
52
fi
91
53
92
54
- name : Update language files
97
59
98
60
- name : Clean Up Credentials
99
61
run : |
100
- rm -f ./gha-creds-*.json
101
-
62
+ rm -f ./gha-creds-*.json
63
+
102
64
- name : Commit language files
103
65
if : steps.dry_run_lang.outputs.lang_updated == 'true'
104
66
run : |
109
71
git push
110
72
env :
111
73
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
112
-
74
+
113
75
- name : Setup Pages
114
76
uses : actions/configure-pages@v5
115
77
0 commit comments