We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 515cbee commit d1d24d3Copy full SHA for d1d24d3
.github/workflows/main.yml
@@ -48,6 +48,23 @@ jobs:
48
- name: Install npm dependencies
49
run: npm install
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
61
+ BASE_URL="https://${{ github.repository_owner }}.github.io/"
62
+ fi
63
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
68
- name: Build site
69
run: npm run build
70
0 commit comments