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
[](https://pages.github.com/)
10
11
@@ -22,7 +23,7 @@
22
23
23
24
<divalign="center">
24
25
25
-
[](https://michaelcurrin.github.io/code-cookbook/)
26
+
[](https://michaelcurrin.github.io/code-cookbook/"Go to website")
Copy file name to clipboardExpand all lines: recipes/ci-cd/github-actions/tokens/index.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -7,17 +7,17 @@ A GitHub Action needs permissions to push to your `gh-pages` branch - so you mus
7
7
8
8
Here are the approaches, from simplest to most complex to manage. A summary is provided.
9
9
10
-
-[GitHub token]({{ site.baseurl }}{% link recipes/ci-cd/github-actions/tokens/github-token.md %})
10
+
-[GitHub token]({% link recipes/ci-cd/github-actions/tokens/github-token.md %})
11
11
- API key scoped to a single repo.
12
12
- Auto-generated for a GH workflow - low effort.
13
13
- Very secure - you never have to copy or even view the value.
14
14
- The main limitation is that this only works for GitHub Actions, unlike the others.
15
-
-[Access token]({{ site.baseurl }}{% link recipes/ci-cd/github-actions/tokens/access-token.md %})
15
+
-[Access token]({% link recipes/ci-cd/github-actions/tokens/access-token.md %})
16
16
- API key scoped to **all** repos in your GH account.
17
17
- Easy to generate and add to a workflow.
18
18
- **Warning** - this is the least secure. A token is for your entire profile, not per repo. With public repo access, a token gives read and write access to all your public repos - a compromised token can be used to do a lot of damage.
19
19
- This key is useful for doing actions with the GH API such as reporting on stats.
20
-
-[Deploy key]({{ site.baseurl }}{% link recipes/ci-cd/github-actions/tokens/deploy-key.md %})
20
+
-[Deploy key]({% link recipes/ci-cd/github-actions/tokens/deploy-key.md %})
21
21
- API key scoped to a repo.
22
22
- Needs to be generated **locally** once using SSH tool and your email address then pasted in so it takes more effort.
23
23
- Slightly less secure then GH Token as you deal with a value, but this is more flexible.
Copy file name to clipboardExpand all lines: recipes/ci-cd/github-actions/workflows/create-pull-request.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Create Pull Request
2
2
3
-
## Related
3
+
## Related
4
4
5
5
-[Commit][] workflows so you create a commit without a Pull Request, such as if you want to commit on the main branch.
6
6
7
-
[Commit]: {{ site.baseurl }}{% link recipes/ci-cd/github-actions/workflows/commit.md %}
7
+
[Commit]: {% link recipes/ci-cd/github-actions/workflows/commit.md %}
8
8
9
9
10
10
{% raw %}
@@ -29,8 +29,8 @@ steps:
29
29
All inputs are optional but you probably want to set some of these:
30
30
31
31
- `title` for PR title.
32
-
- `branch`for branch name to create.
33
-
- `delete-branch`- Delete the branch when closing pull requests, and when undeleted after merging. Recommended as `true`. I don't know how this compares to the settings of the repo. This optional might not be useful.
32
+
- `branch`for branch name to create.
33
+
- `delete-branch`- Delete the branch when closing pull requests, and when undeleted after merging. Recommended as `true`. I don't know how this compares to the settings of the repo. This optional might not be useful.
34
34
35
35
The docs recommend using a fix branch name, rather than one that is unique, to avoid to many branches/PRs.
36
36
@@ -40,7 +40,7 @@ With options:
40
40
steps:
41
41
- name: Create Pull Request
42
42
uses: peter-evans/create-pull-request@v3
43
-
with:
43
+
with:
44
44
title: My PR title
45
45
commit-message: My commit message
46
46
branch: my-branch-name
@@ -50,11 +50,11 @@ steps:
50
50
51
51
## No action
52
52
53
-
Here we hit the GitHub API to create a PR.
53
+
Here we hit the GitHub API to create a PR.
54
54
55
55
We don't actually make the commit or branch here - just the PR itself. See [Commit][] recipe for making the commit.
56
56
57
-
[Commit]: {{ site.baseurl }}{% link recipes/ci-cd/github-actions/workflows/commit.md %}
57
+
[Commit]: {% link recipes/ci-cd/github-actions/workflows/commit.md %}
Copy file name to clipboardExpand all lines: recipes/ci-cd/github-actions/workflows/go/index.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ You can skip GitHub Actions.
18
18
19
19
See [Build and release assets][] workflows section.
20
20
21
-
1. Use shell commands in the workflow to build one or more output files, such as for each OS.
21
+
1. Use shell commands in the workflow to build one or more output files, such as for each OS.
22
22
2. Use the generic `create-release` action to make a release.
23
23
3. Use the generic `upload-actions` action to attach the files to the new release.
24
24
@@ -27,10 +27,10 @@ See [Build and release assets][] workflows section.
27
27
Use [Go Releaser][] action to handle the steps for you in a single action. This makes it easy to maintain and reuse the workflow across Go projecs. It includes support for compiling across platforms too.
28
28
29
29
30
-
[Build and release assets]: {{ site.baseurl }}{% link recipes/ci-cd/github-actions/workflows/build-release-assets/index.md %}
31
-
[Go Releaser]: {{ site.baseurl }}{% link recipes/ci-cd/github-actions/workflows/go/go-releaser.md %}
30
+
[Build and release assets]: {% link recipes/ci-cd/github-actions/workflows/build-release-assets/index.md %}
31
+
[Go Releaser]: {% link recipes/ci-cd/github-actions/workflows/go/go-releaser.md %}
32
32
33
33
34
34
### Related sections
35
35
36
-
-[Go]({{ site.baseurl }}{% link recipes/go/index.md %}) recipes section.
36
+
-[Go]({% link recipes/go/index.md %}) recipes section.
[GH Actions Ruby]: {{ site.baseurl }}{% link recipes/ci-cd/github-actions/workflows/ruby/index.md %}
13
+
[GH Actions Ruby]: {% link recipes/ci-cd/github-actions/workflows/ruby/index.md %}
14
14
15
15
16
16
## Why generic?
17
17
18
-
Why use this this approach? This is a great generic approach, rather than being tied to using an action which is built around Jekyll or Jekyll + GH Pages.
18
+
Why use this this approach? This is a great generic approach, rather than being tied to using an action which is built around Jekyll or Jekyll + GH Pages.
19
19
20
20
The Ruby action does the job well, it reusable across non-Jekyll projects and it will probably be simpler and better maintained than some Jekyll-specific one. Seeing as the Ruby one has wider appeal to the community than a Jekyll-specifi solution.
21
21
@@ -71,4 +71,3 @@ Here we set up a Ruby environment using the `setup-ruby` action. A param is pass
71
71
Replace the Build command `make build` if you prefer.
0 commit comments