Skip to content

Commit 4f49327

Browse files
Update pages-deploy.yml
1 parent 4471132 commit 4f49327

File tree

1 file changed

+13
-36
lines changed

1 file changed

+13
-36
lines changed

.github/workflows/pages-deploy.yml

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
name: Build and Deploy
1+
name: Deploy Jekyll with GitHub Actions
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- master
8-
paths-ignore:
9-
- .gitignore
10-
- README.md
11-
- LICENSE
12-
13-
workflow_dispatch:
5+
branches: [main] # Change to your default branch if different
146

157
permissions:
168
contents: read
@@ -22,49 +14,34 @@ concurrency:
2214
cancel-in-progress: true
2315

2416
jobs:
25-
build:
17+
deploy:
2618
runs-on: ubuntu-latest
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
2722

2823
steps:
29-
- name: Checkout
24+
- name: Checkout source code
3025
uses: actions/checkout@v4
3126

32-
- name: Setup Pages
33-
id: pages
34-
uses: actions/configure-pages@v4
35-
3627
- name: Setup Ruby
3728
uses: ruby/setup-ruby@v1
3829
with:
39-
ruby-version: 3.3
30+
ruby-version: '3.1'
4031
bundler-cache: true
4132

42-
- name: Install dependencies
43-
run: bundle install
44-
45-
- name: Build site
46-
run: bundle exec jekyll build -d _site
33+
- name: Install and Build
34+
run: |
35+
bundle install
36+
bundle exec jekyll build
4737
env:
4838
JEKYLL_ENV: production
4939

50-
- name: Test site
51-
run: |
52-
bundle exec htmlproofer _site \
53-
--disable-external \
54-
--ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
55-
5640
- name: Upload site artifact
5741
uses: actions/upload-pages-artifact@v3
5842
with:
59-
path: _site
43+
path: ./_site
6044

61-
deploy:
62-
environment:
63-
name: github-pages
64-
url: ${{ steps.deployment.outputs.page_url }}
65-
runs-on: ubuntu-latest
66-
needs: build
67-
steps:
6845
- name: Deploy to GitHub Pages
6946
id: deployment
7047
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)