diff --git a/.github/workflows/build-preview.yaml b/.github/workflows/build-preview.yaml index 4d613c7b..52842860 100644 --- a/.github/workflows/build-preview.yaml +++ b/.github/workflows/build-preview.yaml @@ -38,17 +38,17 @@ jobs: ruby-version: "3.0" bundler-cache: true - # - name: Get Pages url - # if: github.event.action != 'closed' - # id: pages - # uses: actions/configure-pages@v2 - # with: - # enablement: false + - name: Get Pages url + if: github.event.action != 'closed' + id: pages + uses: actions/configure-pages@v2 + with: + enablement: false - name: Build preview version of site if: github.event.action != 'closed' run: | - JEKYLL_ENV=production bundle exec jekyll build --baseurl "https://sciai-lab.org/${{ env.PREVIEWS_FOLDER }}/pr-${{ github.event.number }}" + JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ github.event.number }}" - name: Commit preview to Pages branch uses: rossjrw/pr-preview-action@v1 diff --git a/.github/workflows/build-site.yaml b/.github/workflows/build-site.yaml index df552a54..9b71767f 100644 --- a/.github/workflows/build-site.yaml +++ b/.github/workflows/build-site.yaml @@ -33,15 +33,15 @@ jobs: ruby-version: "3.0" bundler-cache: true - # - name: Get Pages url - # id: pages - # uses: actions/configure-pages@v2 - # with: - # enablement: false + - name: Get Pages url + id: pages + uses: actions/configure-pages@v2 + with: + enablement: false - name: Build live version of site run: | - JEKYLL_ENV=production bundle exec jekyll build --baseurl "https://sciai-lab.org/" + JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}" - name: Commit live site to Pages branch uses: JamesIves/github-pages-deploy-action@v4