You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ jobs:
108
108
# Run your deployment logic for your project here - examples seen below
109
109
110
110
# Checkout your projects repository based on the ref provided by the branch-deploy step
111
-
- uses: actions/checkout@3.0.2
111
+
- uses: actions/checkout@v3
112
112
with:
113
113
ref: ${{ steps.branch-deploy.outputs.ref }}
114
114
@@ -203,7 +203,7 @@ jobs:
203
203
runs-on: ubuntu-latest
204
204
steps:
205
205
# Checkout your projects repository
206
-
- uses: actions/checkout@3.0.2
206
+
- uses: actions/checkout@v3
207
207
```
208
208
209
209
Sets up your `demo` job, uses an ubuntu runner, and checks out your repo - Just some standard setup for a general Action. We also add an `if:` statement here to only run this workflow on pull request comments to make it a little cleaner
Copy file name to clipboardExpand all lines: docs/examples.md
+33-16Lines changed: 33 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,23 @@ This section contains real world and common examples of how you could use this A
4
4
5
5
> Note: In all examples, we will be using `uses: github/[email protected]`. Replace `X.X.X` with the [latest version](https://github.com/marketplace/actions/branch-deploy) of this Action
6
6
7
+
## Table of Contents
8
+
9
+
Quick links below to jump to a specific branch-deploy example:
10
+
11
+
-[Examples](#examples)
12
+
-[Table of Contents](#table-of-contents)
13
+
-[Simple Example](#simple-example)
14
+
-[Terraform](#terraform)
15
+
-[Heroku](#heroku)
16
+
-[Railway](#railway)
17
+
-[SSH](#ssh)
18
+
-[Cloudflare Pages](#cloudflare-pages)
19
+
-[Cloudflare Workers](#cloudflare-workers)
20
+
-[Multiple Jobs](#multiple-jobs)
21
+
-[Multiple Jobs with GitHub Pages and Hugo](#multiple-jobs-with-github-pages-and-hugo)
22
+
-[Multiple Jobs with GitHub Pages and Astro](#multiple-jobs-with-github-pages-and-astro)
23
+
7
24
## Simple Example
8
25
9
26
This is the simplest possible example of how you could use the branch-deploy Action for reference
# checkout the project's repository based on the ref provided by the branch-deploy step
512
529
- name: checkout
513
-
uses: actions/checkout@v3.3.0
530
+
uses: actions/checkout@v3
514
531
with:
515
532
ref: ${{ needs.trigger.outputs.ref }}
516
533
@@ -612,7 +629,7 @@ jobs:
612
629
613
630
## Multiple Jobs with GitHub Pages and Hugo
614
631
615
-
A detailed example using multiple jobs, custom deployment status creation, non-sticky lock removal, and comments
632
+
A detailed example using multiple jobs, custom deployment status creation, non-sticky lock removal, and comments. This example showcases building a static site with [hugo](https://gohugo.io/) and deploying it to [GitHub Pages](https://pages.github.com/).
616
633
617
634
> This live example can be found [here](https://github.com/GrantBirki/blog/blob/25a51aff28c066e378844992c20afc6c58131e26/.github/workflows/branch-deploy.yml)
618
635
@@ -635,7 +652,7 @@ permissions:
635
652
636
653
# set an environment variable for use in the jobs pointing to my blog
637
654
env:
638
-
blog_url: https://blog.birki.io# <--- CHANGE THIS TO YOUR BLOG URL
655
+
blog_url: https://test.example.com# <--- CHANGE THIS TO YOUR BLOG URL
639
656
640
657
jobs:
641
658
# branch-deploy trigger job
@@ -666,7 +683,7 @@ jobs:
666
683
environment: "github-pages"
667
684
production_environment: "github-pages"
668
685
skip_completing: "true"# we will complete the deployment manually in the 'result' job
669
-
admins: "GrantBirki"
686
+
admins: "false"# <--- add your GitHub username here (if you want to use the admins feature)
670
687
671
688
# build the github-pages site with hugo
672
689
build:
@@ -677,7 +694,7 @@ jobs:
677
694
steps:
678
695
# checkout the project's repository based on the ref provided by the branch-deploy step
679
696
- name: checkout
680
-
uses: actions/checkout@v3.3.0
697
+
uses: actions/checkout@v3
681
698
with:
682
699
ref: ${{ needs.trigger.outputs.ref }}
683
700
@@ -829,7 +846,7 @@ jobs:
829
846
830
847
## Multiple Jobs with GitHub Pages and Astro
831
848
832
-
A detailed example using multiple jobs, custom deployment status creation, non-sticky lock removal, and comments - Using [Astro](https://astro.build)
849
+
A detailed example using multiple jobs, custom deployment status creation, non-sticky lock removal, and comments - Using [Astro](https://astro.build) to create a static site and deploying to [GitHub Pages](https://pages.github.com/)
833
850
834
851
> A live example can be found [here](https://github.com/GrantBirki/astrowind/blob/72eb4890cfd6eda6b4f6f66c62f24a2f141ee49a/.github/workflows/branch-deploy.yml)
835
852
@@ -852,7 +869,7 @@ permissions:
852
869
853
870
# set an environment variable for use in the jobs pointing the site_url
854
871
env:
855
-
site_url: https://astro-demo.birki.io# <--- change this to your site url
872
+
site_url: https://test.example.com# <--- change this to your site url
0 commit comments