File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change
1
+ # Sample workflow for building and deploying a Hugo site to GitHub Pages
1
2
name : Deploy Hugo site to Pages
2
3
3
4
on :
5
+ # Runs on pushes targeting the default branch
4
6
push :
5
7
branches : ["main"]
6
8
9
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
7
10
permissions :
8
11
contents : read
9
12
pages : write
10
13
id-token : write
11
14
15
+ # Environment variables available to all jobs and steps in this workflow
12
16
env :
13
17
HUGO_ENV : production
14
18
HUGO_VERSION : " 0.118.2"
15
19
GO_VERSION : " 1.20.5"
16
20
NODE_VERSION : " 18.15.0"
17
21
18
22
jobs :
23
+ # Build job
19
24
build :
20
25
runs-on : ubuntu-24.04-arm
21
26
steps :
45
50
- name : Install npm dependencies
46
51
run : npm install
47
52
48
- - name : Determine Base URL
49
- id : base_url
50
- run : |
51
- REPO_NAME=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
52
- if [[ "${{ github.repository_owner }}" == "${{ github.repository_owner }}" ]]; then
53
- BASE_URL="https://${{ github.repository_owner }}.github.io/${REPO_NAME}/"
54
- else
55
- BASE_URL="https://${{ github.repository_owner }}.github.io/"
56
- fi
57
- echo "BASE_URL=$BASE_URL" >> $GITHUB_ENV
58
-
59
- - name : Modify hugo.toml
60
- run : sed -i "s|baseURL = .*|baseURL = \"$BASE_URL\"|" hugo.toml
61
-
62
53
- name : Build site
63
54
run : npm run build
64
55
67
58
with :
68
59
path : ./public
69
60
61
+ # Deployment job
70
62
deploy :
71
63
environment :
72
64
name : github-pages
Original file line number Diff line number Diff line change 1
1
# ##################### default configuration ####################
2
2
# The base URL of your site (required). This will be prepended to all relative URLs.
3
- # baseURL = "https://open-neuromorphic.org"
4
- baseURL = " https://neural-loop.github.io/open-neuromorphic.github.io/"
3
+ baseURL = " https://open-neuromorphic.org"
4
+ # baseURL = "https://neural-loop.github.io/open-neuromorphic.github.io/"
5
5
# Title of your website (required).
6
6
title = " Open Neuromorphic"
7
7
You can’t perform that action at this time.
0 commit comments