From 9de31d05071c4effbe7d0ddb00dd7cf00ff8a378 Mon Sep 17 00:00:00 2001 From: Kristof Goossens Date: Wed, 23 Nov 2022 22:00:52 +0100 Subject: [PATCH] Change the only keyword to use the newer rules syntax --- docs/publishing-your-site.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/publishing-your-site.md b/docs/publishing-your-site.md index 6090e6ce6..1b7301594 100644 --- a/docs/publishing-your-site.md +++ b/docs/publishing-your-site.md @@ -122,15 +122,14 @@ contents: image: python:latest pages: stage: deploy - only: - - master # (1)! - - main script: - pip install mkdocs-material - mkdocs build --site-dir public artifacts: paths: - public + rules: + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' ``` 1. At some point, GitLab renamed `master` to `main`. If your default branch @@ -142,15 +141,14 @@ contents: image: python:latest pages: stage: deploy - only: - - master - - main script: # (1)! - pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git - mkdocs build --site-dir public artifacts: paths: - public + rules: + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' ``` 1. Remember to set the `GH_TOKEN` environment variable to the value of your