File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : " Build and Deploy"
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ paths-ignore :
7
+ - .gitignore
8
+ - README.md
9
+ - LICENSE
10
+
11
+ # Allows you to run this workflow manually from the Actions tab
12
+ workflow_dispatch :
13
+
14
+ permissions :
15
+ contents : read
16
+ pages : write
17
+ id-token : write
18
+
19
+ # Allow one concurrent deployment
20
+ concurrency :
21
+ group : " pages"
22
+ cancel-in-progress : true
23
+
24
+ jobs :
25
+ build :
26
+ runs-on : ubuntu-latest
27
+
28
+ steps :
29
+ - name : Checkout
30
+ uses : actions/checkout@v4
31
+ with :
32
+ fetch-depth : 0
33
+ # submodules: true
34
+ # If using the 'assets' git submodule from Chirpy Starter, uncomment above
35
+ # (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
36
+
37
+ - name : Setup Pages
38
+ id : pages
39
+ uses : actions/configure-pages@v4
40
+
41
+ - name : Setup Ruby
42
+ uses : ruby/setup-ruby@v1
43
+ with :
44
+ ruby-version : 3.3
45
+ bundler-cache : true
46
+
47
+ - name : Build site
48
+ run : bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
49
+ env :
50
+ JEKYLL_ENV : " production"
51
+
52
+ - name : Test site
53
+ run : |
54
+ bundle exec htmlproofer _site \
55
+ \-\-disable-external=true \
56
+ \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
57
+
58
+ - name : Upload site artifact
59
+ uses : actions/upload-pages-artifact@v3
60
+ with :
61
+ path : " _site${{ steps.pages.outputs.base_path }}"
62
+
63
+ deploy :
64
+ environment :
65
+ name : github-pages
66
+ url : ${{ steps.deployment.outputs.page_url }}
67
+ runs-on : ubuntu-latest
68
+ needs : build
69
+ steps :
70
+ - name : Deploy to GitHub Pages
71
+ id : deployment
72
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments