Skip to content

Commit d34960f

Browse files
committed
Bump to latest hugo version
1 parent 459fae6 commit d34960f

File tree

1 file changed

+26
-26
lines changed
  • userguide/content/en/docs/deployment

1 file changed

+26
-26
lines changed

userguide/content/en/docs/deployment/_index.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -86,41 +86,41 @@ Make sure to correctly set your site's `baseURL`, either via hugo's `--baseURL '
8686
{{% /alert %}}
8787

8888
1. With GitHub Pages, a site is published to the branch `gh-pages` and served from there by default. You must create this branch first, either in the GitHub web interface or via command line (at the root of your local repo clone):
89-
89+
9090
```console
9191
$ git checkout -b gh-pages
9292
Switched to a new branch 'gh-pages'
9393
```
94-
94+
9595
1. Push this local branch to your repo:
96-
96+
9797
```console
9898
$ git push --set-upstream origin gh-pages
9999
details omitted …
100100
* [new branch] new -> new
101101
branch 'gh-pages' set up to track 'origin/gh-pages'.
102102
```
103-
103+
104104
1. Switch back to the `main` (or `work`) branch of your repo:
105-
105+
106106
```console
107107
$ git checkout main
108108
Switched to branch 'main'
109-
109+
110110
```
111-
111+
112112
1. Check if you already have the workflow file `.github/workflows/deploy-github-pages.yml` in your repo. If this file doesn't exist, do the following:
113113

114114
1. Create a new empty workflow file from the root of your repo, as follows:
115-
115+
116116
```console
117117
$ mkdir -p .github/workflows
118118
$ touch .github/workflows/deploy-github-pages.yml
119119
```
120120

121-
121+
122122
1. Open the file in an editor of your choice, paste in the code below, and save the file:
123-
123+
124124
```yaml
125125
name: Deployment to GitHub Pages
126126

@@ -144,46 +144,46 @@ Make sure to correctly set your site's `baseURL`, either via hugo's `--baseURL '
144144
- uses: actions/checkout@v3
145145
with:
146146
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
147-
147+
148148
- name: Setup Hugo
149149
uses: peaceiris/actions-hugo@v2
150150
with:
151-
hugo-version: '0.110.0'
151+
hugo-version: '0.120.4'
152152
extended: true
153-
153+
154154
- name: Setup Node
155-
uses: actions/setup-node@v3
155+
uses: actions/setup-node@v4
156156
with:
157-
node-version: '18'
157+
node-version: '20'
158158
cache: 'npm'
159159
cache-dependency-path: '**/package-lock.json'
160-
160+
161161
- run: npm ci
162162
- run: hugo --baseURL https://${REPO_OWNER}.github.io/${REPO_NAME} --minify
163-
163+
164164
- name: Deploy
165165
uses: peaceiris/actions-gh-pages@v3
166166
if: ${{ github.ref == 'refs/heads/main' }} # <-- specify same branch as above here
167167
with:
168168
github_token: ${{ secrets.GITHUB_TOKEN }}
169169
```
170-
170+
171171
1. Add the file to the staging area, commit your change and push the change to your remote GitHub repo:
172-
172+
173173
```console
174174
$ git add .github/workflows/deploy-github-pages.yml
175175
$ git commit -m "Adding workflow file for site deployment"
176-
$ git push origin
176+
$ git push origin
177177
```
178-
178+
179179
1. In your browser, make sure you are logged into your GitHub account. In your repo **Settings**, select **Pages**.
180-
180+
181181
1. Under **Build and deployment**, select **Deploy from a branch** in the **source** dropdown.
182-
182+
183183
2. From the **branch** dropdown, select **gh-page** as branch where the site is built from.
184-
184+
185185
3. From the **folder** dropdown, select **/(root)** as root directory.
186-
186+
187187
That's it! Your deployment workflow for your site is configured.
188188

189189
Any future push to the branch specified in your workflow file will now trigger the action workflow defined in the workflow file. Additionally, you can trigger the deployment manually by using GitHub web UI.
@@ -194,7 +194,7 @@ Once you push to your repo, you can see the progress of the triggered workflow i
194194
URL 'Repo actions': https://github.com/<username>/<repository_name>/actions
195195
```
196196
197-
After the first successful deployment, a new environment `github-pages` is added to your repo. This is shown at the right of your repo main view (below **Releases** and **Packages**). When you click on this environment, a list of deployments is displayed:
197+
After the first successful deployment, a new environment `github-pages` is added to your repo. This is shown at the right of your repo main view (below **Releases** and **Packages**). When you click on this environment, a list of deployments is displayed:
198198
199199
```
200200
URL 'Repo deployments': https://github.com/<username>/<repository_name>/deployments/

0 commit comments

Comments
 (0)