Skip to content

Commit e107ea9

Browse files
authored
Update jekyll-gh-pages.yml
1 parent f05b856 commit e107ea9

1 file changed

Lines changed: 18 additions & 20 deletions

File tree

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy with GitHub Pages
1+
name: Deploy GitHub Pages
22

33
on:
44
push:
@@ -17,36 +17,34 @@ concurrency:
1717
cancel-in-progress: false
1818

1919
jobs:
20-
build:
20+
build-and-deploy:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- name: Checkout
23+
- name: Checkout repository
2424
uses: actions/checkout@v4
2525

26-
- name: Setup Pages
27-
uses: actions/configure-pages@v5
28-
26+
# Upload your static site artifact
2927
- name: Upload static site
3028
uses: actions/upload-pages-artifact@v3
3129
with:
32-
path: ./
30+
path: ./ # root folder of your site
3331

34-
deploy:
35-
environment:
36-
name: github-pages
37-
runs-on: ubuntu-latest
38-
needs: build
39-
steps:
40-
- name: Deploy to GitHub Pages
41-
id: deployment
32+
# Deploy master branch → .dev
33+
- name: Deploy master branch to .dev
4234
if: github.ref == 'refs/heads/master'
43-
uses: actions/deploy-pages@v4
35+
uses: peaceiris/actions-gh-pages@v3
4436
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: ./
39+
publish_branch: gh-pages-master
4540
cname: ankitved.dev
46-
47-
- name: Deploy to GitHub Pages
48-
id: deployment_development
41+
42+
# Deploy all other branches → .in
43+
- name: Deploy other branches to .in
4944
if: github.ref != 'refs/heads/master'
50-
uses: actions/deploy-pages@v4
45+
uses: peaceiris/actions-gh-pages@v3
5146
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
publish_dir: ./
49+
publish_branch: gh-pages-enhancements
5250
cname: ankitved.in

0 commit comments

Comments
 (0)