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 4848 - name : Install npm dependencies
4949 run : npm install
5050
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
5168 - name : Build site
5269 run : npm run build
5370
You can’t perform that action at this time.
0 commit comments