File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 13
13
steps :
14
14
- name : Check out repository
15
15
uses : actions/checkout@v4
16
+ - name : Extract branch name
17
+ shell : bash
18
+ run : echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
19
+ id : extract-branch
16
20
- name : Install gems
17
21
run : bundle install
18
- - name : Build website
22
+ - name : Build website (non-production)
23
+ if : steps.extract-branch.outputs.branch != 'main'
24
+ run : bundle exec jekyll build --drafts
25
+ - name : Build website (production)
26
+ if : steps.extract-branch.outputs.branch == 'main'
19
27
run : bundle exec jekyll build
20
28
env :
21
29
JEKYLL_ENV : production
47
55
- name : Extract branch name
48
56
shell : bash
49
57
run : echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
50
- id : extract_branch
58
+ id : extract-branch
51
59
- name : Download built website
52
60
uses : actions/download-artifact@v4
53
61
with :
62
70
with :
63
71
apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
64
72
accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
65
- command : pages deploy _site --project-name=beh-uk --branch=${{ steps.extract_branch .outputs.branch }} --commit-dirty=true
73
+ command : pages deploy _site --project-name=beh-uk --branch=${{ steps.extract-branch .outputs.branch }} --commit-dirty=true
66
74
67
75
deploy-d1 :
68
76
needs : [build-jekyll, validate-d1]
You can’t perform that action at this time.
0 commit comments