From 4c73e8390d854b856e895cf7a1790e45144e8818 Mon Sep 17 00:00:00 2001 From: Jan Brasna <1784648+janbrasna@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:53:06 +0200 Subject: [PATCH 1/3] Add deploy CI fetch --- scripts/ci/deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/deploy.sh b/scripts/ci/deploy.sh index 86e1893bd..a88c8fefd 100755 --- a/scripts/ci/deploy.sh +++ b/scripts/ci/deploy.sh @@ -31,7 +31,8 @@ cp "scripts/ci/generate_redirects.rb" "/tmp/" # Clean all temporary files (e.g. .bundle/config and .ruby-version) git clean -f -d # Check out gh-pages and clear all files -git reset --hard HEAD # we don't want the `git checkout` to cause issues (e.g. https://circleci.com/gh/fastlane/docs/730) +git reset --hard HEAD +git fetch git checkout gh-pages rm -rf * # Copy the finished HTML page to the current directory From 7f69c50186707c69e94a089b75744459f0a3d751 Mon Sep 17 00:00:00 2001 From: Jan Brasna <1784648+janbrasna@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:02:12 +0200 Subject: [PATCH 2/3] Reorder and group deploy comments --- scripts/ci/deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/deploy.sh b/scripts/ci/deploy.sh index a88c8fefd..7b5f6dca8 100755 --- a/scripts/ci/deploy.sh +++ b/scripts/ci/deploy.sh @@ -28,10 +28,10 @@ cp -R "site/" "/tmp/fl-docs" # Copy the needed Ruby scripts to a temporary location (used for redirects) cp "scripts/ci/available_redirects.rb" "/tmp/" cp "scripts/ci/generate_redirects.rb" "/tmp/" -# Clean all temporary files (e.g. .bundle/config and .ruby-version) +# Clean all temporary files (e.g. .bundle/config and .ruby-version) and reset the index git clean -f -d -# Check out gh-pages and clear all files git reset --hard HEAD +# Check out gh-pages and clear all files git fetch git checkout gh-pages rm -rf * From 4ec61bd8c6d6a11f47ead7432fc24a4155f836ae Mon Sep 17 00:00:00 2001 From: Jan Brasna <1784648+janbrasna@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:48:03 +0200 Subject: [PATCH 3/3] Update deploy docs --- scripts/ci/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/deploy.sh b/scripts/ci/deploy.sh index 7b5f6dca8..c182d48b3 100755 --- a/scripts/ci/deploy.sh +++ b/scripts/ci/deploy.sh @@ -28,7 +28,7 @@ cp -R "site/" "/tmp/fl-docs" # Copy the needed Ruby scripts to a temporary location (used for redirects) cp "scripts/ci/available_redirects.rb" "/tmp/" cp "scripts/ci/generate_redirects.rb" "/tmp/" -# Clean all temporary files (e.g. .bundle/config and .ruby-version) and reset the index +# Clean untracked files (like temp .bundle/* or generated docs/actions*) and reset index git clean -f -d git reset --hard HEAD # Check out gh-pages and clear all files