Skip to content

Commit 8aae941

Browse files
authored
Create deploy_to_gh_pages_vanilla.yaml
1 parent 0ac601c commit 8aae941

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy to GitHub Pages (Vanilla)
2+
3+
on:
4+
push:
5+
branches: ["prod/iiitnr"]
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Add 404.html fallback
30+
run: |
31+
if [ -f index.html ]; then
32+
cp index.html 404.html
33+
fi
34+
35+
- name: Add CNAME for custom domain
36+
run: echo "${{ secrets.PROJECT_DOMAIN }}" > CNAME
37+
38+
- name: Upload GitHub Pages artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: .
42+
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)