File tree Expand file tree Collapse file tree 6 files changed +87
-4
lines changed Expand file tree Collapse file tree 6 files changed +87
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy master to live
2
+ on : workflow_dispatch
3
+
4
+ jobs :
5
+ deploy-live :
6
+ name : Deploy master to live
7
+ runs-on : ubuntu-latest
8
+ environment : deploy
9
+
10
+ steps :
11
+ - name : Checkout repository
12
+ uses : actions/checkout@v4
13
+ with :
14
+ ref : master
15
+
16
+ - name : Build the site
17
+ run : ./build.sh
18
+
19
+ - name : Deploy to Netlify
20
+ run : ./deploy.sh --live
21
+ env :
22
+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Push preview to master and deploy to live
2
+ on : workflow_dispatch
3
+
4
+ jobs :
5
+ deploy-preview :
6
+ name : Push preview to master and deploy to live
7
+ runs-on : ubuntu-latest
8
+ environment : deploy
9
+
10
+ steps :
11
+ - name : Checkout repository
12
+ uses : actions/checkout@v4
13
+ with :
14
+ ref : preview
15
+
16
+ - name : Build the site
17
+ run : ./build.sh
18
+
19
+ - name : Push preview to master
20
+ run : git push origin preview:master
21
+
22
+ - name : Deploy to Netlify
23
+ run : ./deploy.sh --live
24
+ env :
25
+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Deploy preview branch
2
+ on : workflow_dispatch
3
+
4
+ jobs :
5
+ deploy-preview :
6
+ name : Deploy preview branch
7
+ runs-on : ubuntu-latest
8
+ environment : deploy
9
+
10
+ steps :
11
+ - name : Checkout repository
12
+ uses : actions/checkout@v4
13
+ with :
14
+ ref : preview
15
+
16
+ - name : Build the site
17
+ run : ./build.sh
18
+
19
+ - name : Deploy preview to Netlify
20
+ run : ./deploy.sh --github-action-preview-subdomain
21
+ env :
22
+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
Original file line number Diff line number Diff line change 1
- name : Update and Preview
1
+ name : Fetch docs and deploy preview branch
2
2
on : workflow_dispatch
3
3
4
4
jobs :
5
5
deploy-preview :
6
- name : Deploy Preview
6
+ name : Fetch docs and deploy preview branch
7
7
runs-on : ubuntu-latest
8
8
environment : deploy
9
9
17
17
SF_HELP_NOTION_TOKEN : ${{ secrets.SF_HELP_NOTION_TOKEN }}
18
18
SF_HELP_NOTION_ROOT_PAGE_ID : ${{ secrets.SF_HELP_NOTION_ROOT_PAGE_ID }}
19
19
20
+ - name : Commit changes
21
+ run : |
22
+ git config user.name "github-actions[bot]"
23
+ git config user.email "github-actions[bot]@users.noreply.github.com"
24
+ git add .
25
+ git commit -m "Update files from Notion"
26
+
20
27
- name : Build the site
21
28
run : ./build.sh
22
29
30
+ - name : Push changes to preview branch
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
+ run : git push -f origin HEAD:preview
34
+
23
35
- name : Deploy preview to Netlify
24
36
run : ./deploy.sh --github-action-preview-subdomain
25
37
env :
Original file line number Diff line number Diff line change @@ -5,8 +5,10 @@ set -euxo pipefail
5
5
# NETLIFY_AUTH_TOKEN must be set in the environment
6
6
export NETLIFY_SITE_ID=aba3890d-2b7b-4144-883f-7c600965db82
7
7
8
- if [ " $# " -eq 1 ] && [ " $1 " == " --github-action-preview-subdomain" ]; then
8
+ if (( "$# " == 1 )) && [[ " $1 " == " --github-action-preview-subdomain" ] ]; then
9
9
npx netlify deploy --dir build --alias github-action-preview
10
+ elif (( "$# " == 1 )) && [[ " $1 " == " --prod" ]]; then
11
+ npx netlify deploy --dir build --prod
10
12
else
11
13
npx netlify deploy --dir build
12
14
fi
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ sed -i s/:::📝/:::note/g docs/*.md
11
11
# Add a div around the ReactPlayer component to make it responsive
12
12
sed -i -e ' /<ReactPlayer/ s/^/<div class="player-wrapper">/' -e ' /<ReactPlayer/ s/$/<\/div>/' docs/* .md
13
13
14
- if [ " $# " -ge 1 ] && [ " $1 " == " --skip-pulling-from-s3" ]; then
14
+ if (( "$# " == 1 )) && [[ " $1 " == " --skip-pulling-from-s3" ] ]; then
15
15
echo " Skipping pulling from S3."
16
16
else
17
17
mkdir -p s3
You can’t perform that action at this time.
0 commit comments