From d482f55f0c39ad26bdd370ceed091e1931980024 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Sun, 3 Mar 2024 10:23:08 +0100 Subject: [PATCH 1/3] Add paths for `website-cd` workflow --- .github/workflows/website_cd.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/website_cd.yml b/.github/workflows/website_cd.yml index b1065cea6..c2001d0c5 100644 --- a/.github/workflows/website_cd.yml +++ b/.github/workflows/website_cd.yml @@ -17,6 +17,30 @@ on: push: branches: - main + paths: + # We only build and deploy a new version, when a user relevant files + # changed. + - "website/**" + # We trigger also this workflow, if this workflow is changed, so that new + # changes will be applied. + - ".github/workflows/website_cd.yml" + # The following paths are excluded from the above paths. It's important to + # list the paths at the end of the file, so that the exclude paths are + # applied. + # + # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-and-excluding-paths. + - "!**/*.md" + - "!**/*.mdx" + - "!**/*.gitignore" + # The macOS version is only used for debugging. + - "!website/macos/**" + # Test files are not relevant for the website deployment. + - "!**/test/**" + - "!**/test_driver/**" + - "!**/integration_test/**" + # Example files are not relevant for the alpha program. + - "!**/analysis_options.yaml" + - "!**/dart_test.yaml" # Set permissions to none. # From 19be38e224497a4b2c59e472757d34305e81b2e2 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Sun, 3 Mar 2024 10:28:41 +0100 Subject: [PATCH 2/3] Remove comment --- .github/workflows/website_cd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/website_cd.yml b/.github/workflows/website_cd.yml index c2001d0c5..0cdfbe1a7 100644 --- a/.github/workflows/website_cd.yml +++ b/.github/workflows/website_cd.yml @@ -38,7 +38,6 @@ on: - "!**/test/**" - "!**/test_driver/**" - "!**/integration_test/**" - # Example files are not relevant for the alpha program. - "!**/analysis_options.yaml" - "!**/dart_test.yaml" From 7b9cd6e53602ed43db1f39a5ab92d5b8d28c7aee Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Sun, 3 Mar 2024 10:30:36 +0100 Subject: [PATCH 3/3] Add `workflow_dispatch` --- .github/workflows/website_cd.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/website_cd.yml b/.github/workflows/website_cd.yml index 0cdfbe1a7..3cb65ec03 100644 --- a/.github/workflows/website_cd.yml +++ b/.github/workflows/website_cd.yml @@ -41,6 +41,15 @@ on: - "!**/analysis_options.yaml" - "!**/dart_test.yaml" + # Allows you to run this workflow manually from the Actions tab. + # + # Since the website depends on the /lib folder, it could be that the website + # requires a new deployment. In this case, the developer needs to trigger the + # deployment manually or wait until the next change "website/**" is pushed. We + # do this to avoid unnecessary deployments since a new deployment invalidates + # the cache. + workflow_dispatch: + # Set permissions to none. # # Using the broad default permissions is considered a bad security practice