Skip to content

Commit 334a297

Browse files
authored
Merge pull request #141 from github/update-docs
Update Documentation
2 parents 1c33624 + 0299fad commit 334a297

File tree

3 files changed

+36
-19
lines changed

3 files changed

+36
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
# Run your deployment logic for your project here - examples seen below
109109

110110
# 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
112112
with:
113113
ref: ${{ steps.branch-deploy.outputs.ref }}
114114

@@ -203,7 +203,7 @@ jobs:
203203
runs-on: ubuntu-latest
204204
steps:
205205
# Checkout your projects repository
206-
- uses: actions/checkout@3.0.2
206+
- uses: actions/checkout@v3
207207
```
208208

209209
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

docs/examples.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ This section contains real world and common examples of how you could use this A
44

55
> 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
66
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+
724
## Simple Example
825

926
This is the simplest possible example of how you could use the branch-deploy Action for reference
@@ -39,7 +56,7 @@ jobs:
3956
uses: github/[email protected]
4057

4158
# If the branch-deploy Action was triggered, checkout our branch
42-
- uses: actions/checkout@v3.3.0
59+
- uses: actions/checkout@v3
4360
with:
4461
ref: ${{ steps.branch-deploy.outputs.ref }}
4562

@@ -98,15 +115,15 @@ jobs:
98115
# If the branch-deploy Action was triggered, checkout our branch
99116
- name: Checkout
100117
if: steps.branch-deploy.outputs.continue == 'true'
101-
uses: actions/checkout@v3.3.0
118+
uses: actions/checkout@v3
102119
with:
103120
ref: ${{ steps.branch-deploy.outputs.ref }}
104121
105122
# Setup Terraform on our Actions runner
106123
- uses: hashicorp/setup-terraform@ed3a0531877aca392eb870f440d9ae7aba83a6bd # pin@v1
107124
if: steps.branch-deploy.outputs.continue == 'true'
108125
with:
109-
terraform_version: 1.1.7
126+
terraform_version: 1.1.7 # use the version of Terraform your project uses here
110127
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
111128
112129
# Run Terraform init in our working directory
@@ -196,7 +213,7 @@ jobs:
196213
# If the branch-deploy Action was triggered, checkout our branch
197214
- name: Checkout
198215
if: steps.branch-deploy.outputs.continue == 'true'
199-
uses: actions/checkout@v3.3.0
216+
uses: actions/checkout@v3
200217
with:
201218
ref: ${{ steps.branch-deploy.outputs.ref }}
202219
@@ -249,7 +266,7 @@ jobs:
249266
# If the branch-deploy Action was triggered, checkout our branch
250267
- name: Checkout
251268
if: steps.branch-deploy.outputs.continue == 'true'
252-
uses: actions/checkout@v3.3.0
269+
uses: actions/checkout@v3
253270
with:
254271
ref: ${{ steps.branch-deploy.outputs.ref }}
255272
@@ -305,7 +322,7 @@ jobs:
305322
# If the branch-deploy Action was triggered, checkout our branch
306323
- name: Checkout
307324
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
308-
uses: actions/checkout@v3.3.0
325+
uses: actions/checkout@v3
309326
with:
310327
ref: ${{ steps.branch-deploy.outputs.ref }}
311328
@@ -360,7 +377,7 @@ jobs:
360377
# If the branch-deploy Action was triggered, checkout our branch
361378
- name: Checkout
362379
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
363-
uses: actions/checkout@v3.3.0
380+
uses: actions/checkout@v3
364381
with:
365382
ref: ${{ steps.branch-deploy.outputs.ref }}
366383
@@ -433,7 +450,7 @@ jobs:
433450
# If the branch-deploy Action was triggered, checkout our branch
434451
- name: Checkout
435452
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
436-
uses: actions/checkout@v3.3.0
453+
uses: actions/checkout@v3
437454
with:
438455
ref: ${{ steps.branch-deploy.outputs.ref }}
439456
@@ -510,7 +527,7 @@ jobs:
510527
steps:
511528
# checkout the project's repository based on the ref provided by the branch-deploy step
512529
- name: checkout
513-
uses: actions/checkout@v3.3.0
530+
uses: actions/checkout@v3
514531
with:
515532
ref: ${{ needs.trigger.outputs.ref }}
516533
@@ -612,7 +629,7 @@ jobs:
612629
613630
## Multiple Jobs with GitHub Pages and Hugo
614631
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/).
616633
617634
> This live example can be found [here](https://github.com/GrantBirki/blog/blob/25a51aff28c066e378844992c20afc6c58131e26/.github/workflows/branch-deploy.yml)
618635
@@ -635,7 +652,7 @@ permissions:
635652

636653
# set an environment variable for use in the jobs pointing to my blog
637654
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
639656

640657
jobs:
641658
# branch-deploy trigger job
@@ -666,7 +683,7 @@ jobs:
666683
environment: "github-pages"
667684
production_environment: "github-pages"
668685
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)
670687

671688
# build the github-pages site with hugo
672689
build:
@@ -677,7 +694,7 @@ jobs:
677694
steps:
678695
# checkout the project's repository based on the ref provided by the branch-deploy step
679696
- name: checkout
680-
uses: actions/checkout@v3.3.0
697+
uses: actions/checkout@v3
681698
with:
682699
ref: ${{ needs.trigger.outputs.ref }}
683700

@@ -829,7 +846,7 @@ jobs:
829846
830847
## Multiple Jobs with GitHub Pages and Astro
831848
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/)
833850
834851
> A live example can be found [here](https://github.com/GrantBirki/astrowind/blob/72eb4890cfd6eda6b4f6f66c62f24a2f141ee49a/.github/workflows/branch-deploy.yml)
835852
@@ -852,7 +869,7 @@ permissions:
852869

853870
# set an environment variable for use in the jobs pointing the site_url
854871
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
856873

857874
jobs:
858875
# branch-deploy trigger job
@@ -894,7 +911,7 @@ jobs:
894911

895912
steps:
896913
- name: checkout
897-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected]
914+
uses: actions/checkout@v3
898915
with:
899916
ref: ${{ needs.trigger.outputs.ref }}
900917

docs/merge-commit-strategy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
# Otherwise, all subsequent steps will be skipped
6464

6565
# Check out the repository
66-
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # [email protected]
66+
- uses: actions/checkout@v3
6767
if: ${{ steps.deployment-check.outputs.continue == 'true' }} # only run if the Action returned 'true' for the 'continue' output
6868

6969
# Do your deployment here! (However you want to do it)

0 commit comments

Comments
 (0)