File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 48
48
- name : Install npm dependencies
49
49
run : npm install
50
50
51
+ - name : Determine Base URL
52
+ id : base_url
53
+ run : |
54
+ if [[ "${{ github.repository_owner }}.github.io" == "open-neuromorphic.github.io" ]]; then
55
+ BASE_URL="https://open-neuromorphic.org/"
56
+ else
57
+ REPO_NAME=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
58
+ if [[ "${{ github.repository_owner }}" == "${{ github.repository_owner }}" ]]; then
59
+ BASE_URL="https://${{ github.repository_owner }}.github.io/${REPO_NAME}/"
60
+ else
61
+ BASE_URL="https://${{ github.repository_owner }}.github.io/"
62
+ fi
63
+ fi
64
+ echo "BASE_URL=$BASE_URL" >> $GITHUB_ENV
65
+
66
+ - name : Modify hugo.toml
67
+ run : sed -i "s|baseURL = .*|baseURL = \"$BASE_URL\"|" hugo.toml
51
68
- name : Build site
52
69
run : npm run build
53
70
You can’t perform that action at this time.
0 commit comments