diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7611c4c..8cfaa0ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,8 +41,14 @@ jobs: wget -O - \ "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \ | sudo tar xzf - -C /usr/local/bin - - name: Generate HTML + + - name: Generate HTML when merged + if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', env.MAIN_BRANCH) }} run: zola build + - name: Generate HTML when building pull request + if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name + run: zola build --base-url "https://nordic-rse.org/previews/PR${{ github.event.number }}" + # Add CNAME, either (first one used) # - file in the root # - the environment variable set above diff --git a/templates/index.html b/templates/index.html index e42d1261..ed90086b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -33,7 +33,7 @@