Skip to content

Commit ec427a9

Browse files
committed
ci(xunidirect): harden Pages deployment workflow
1 parent 81d873b commit ec427a9

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

‎.github/workflows/xunidirect-pages.yml‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,39 @@ jobs:
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@v4
29+
2930
- name: Configure Pages
3031
uses: actions/configure-pages@v5
32+
3133
- name: Build Pages artifact
3234
run: |
35+
rm -rf _site
3336
mkdir -p _site/xunidirect
3437
cp -R docs/xunidirect/. _site/xunidirect/
38+
touch _site/.nojekyll
39+
touch _site/xunidirect/.nojekyll
3540
cat > _site/index.html <<'EOF'
36-
<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="refresh" content="0; url=./xunidirect/"><title>XuniDirect</title></head><body><p><a href="./xunidirect/">Open XuniDirect</a></p></body></html>
41+
<!doctype html>
42+
<html lang="en">
43+
<head>
44+
<meta charset="utf-8">
45+
<meta name="viewport" content="width=device-width,initial-scale=1">
46+
<meta http-equiv="refresh" content="0; url=./xunidirect/">
47+
<title>XuniDirect</title>
48+
</head>
49+
<body><p><a href="./xunidirect/">Open XuniDirect</a></p></body>
50+
</html>
3751
EOF
52+
test -f _site/xunidirect/index.html
53+
test -f _site/xunidirect/styles.css
54+
test -f _site/xunidirect/app.js
55+
test -f _site/xunidirect/assets/xunidirect-hero.svg
56+
3857
- name: Upload Pages artifact
39-
uses: actions/upload-pages-artifact@v3
58+
uses: actions/upload-pages-artifact@v4
4059
with:
4160
path: _site
61+
4262
- name: Deploy to GitHub Pages
4363
id: deployment
4464
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)