diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0c49d64..44b8ae4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,10 +28,6 @@ jobs: - name: Set domain run: echo "DOMAIN=osep.elisa.tech" >> $GITHUB_ENV - - name: Set base URL for preview if PR - if: github.ref != 'refs/heads/main' - run: echo "BASE_URL=https://${{ env.DOMAIN }}/${{ env.PR_PATH}}/" >> $GITHUB_ENV - - name: Setup python uses: actions/setup-python@v5 with: @@ -40,6 +36,12 @@ jobs: - name: Checkout the triggering ref uses: actions/checkout@v4 + - name: Adjust BASE_URL and css if this is a PR + if: github.ref != 'refs/heads/main' + run: | + echo "BASE_URL=https://${{ env.DOMAIN }}/${{ env.PR_PATH}}/" >> $GITHUB_ENV + cat docs/stylesheets/draft.css >> docs/stylesheets/elisa.css + - name: Build site run: | pip install -r docs/requirements.txt diff --git a/docs/stylesheets/draft.css b/docs/stylesheets/draft.css new file mode 100644 index 0000000..b524975 --- /dev/null +++ b/docs/stylesheets/draft.css @@ -0,0 +1,10 @@ + +.md-content__inner.md-typeset:before { + content: "DRAFT FROM PR"; + -webkit-transform: rotate(351deg); + -moz-transform: rotate(351deg); + -o-transform: rotate(351deg); + transform: rotate(351deg); + font-size: 10em; + color: rgba(255, 5, 5, 0.17); + }