File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Update Downloads
2
+
3
+ on :
4
+ push :
5
+ paths :
6
+ - ' content/**'
7
+
8
+ jobs :
9
+ update-downloads :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout Notebooks repo
13
+ uses : actions/checkout@v2
14
+ with :
15
+ fetch-depth : 0
16
+
17
+ - name : Install zip
18
+ run : sudo apt-get install zip
19
+
20
+ - name : Zip content directories
21
+ run : |
22
+ cd content
23
+ for dir in week*; do
24
+ zip -r "../$dir.zip" "$dir" -X -q -x "*.git*"
25
+ done
26
+ cd ..
27
+
28
+ - name : Checkout Downloads repo
29
+ uses : actions/checkout@v2
30
+ with :
31
+ repository : PythonFreeCourse/downloads
32
+ token : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
33
+ path : downloads
34
+
35
+ - name : Copy zip files to Downloads repo
36
+ run : |
37
+ cp *.zip downloads/
38
+
39
+ - name : Commit and push changes
40
+ run : |
41
+ cd downloads
42
+ git config user.name "${{ github.actor }}"
43
+ git config user.email "${{ github.actor }}@users.noreply.github.com"
44
+ git add -A .
45
+ git commit -m "Update zip files by ${{ github.actor }}" || echo "No changes to commit"
46
+ git push
You can’t perform that action at this time.
0 commit comments