File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 2424 -H "X-GitHub-Api-Version: 2022-11-28" \
2525 https://api.github.com/repos/$repo_owner/$repo_name/actions/workflows/$workflow_file/dispatches \
2626 -d "$json_data"
27+
28+ publish_zip :
29+ runs-on : ubuntu-latest
30+ needs : [] # Run in parallel
31+ steps :
32+ - name : Checkout repository
33+ uses : actions/checkout@v4
34+
35+ - name : Zip course-material
36+ run : |
37+ cd course-material
38+ zip -r ../course-material.zip .
39+ cd ..
40+
41+ - name : Upload to GitHub Pages branch
42+ run : |
43+ mkdir gh-pages
44+ mv course-material.zip gh-pages/
45+ cd gh-pages
46+ git init
47+ git config user.name "github-actions"
48+ git config user.email "github-actions@github.com"
49+ git add .
50+ git commit -m "Publish course-material.zip"
51+ git branch -M gh-pages
52+ git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
53+ git push -f origin gh-pages
You can’t perform that action at this time.
0 commit comments