Skip to content

Commit 1536c5b

Browse files
Update the action to publish a zip file of the material content
1 parent fa2c334 commit 1536c5b

2 files changed

Lines changed: 23 additions & 12 deletions

File tree

.github/workflows/trigger-website-publishing.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ jobs:
3838
zip -r ../course-material.zip .
3939
cd ..
4040
41-
- name: Upload to GitHub Pages branch
41+
- name: Move zip to _public folder
4242
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
43+
mkdir -p _public
44+
mv course-material.zip _public/
45+
46+
# download UIs
47+
- name: Upload GitHub Pages Artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: _public
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

_public/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Course material</title>
6+
</head>
7+
<body>
8+
<h1>Note</h1>
9+
<p>This site is providing course material for the CTI website. It is not dedicated for human visitors.</p>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)