From d1a71dd0667c366a7f5ec9bf52d1ed933aac8890 Mon Sep 17 00:00:00 2001 From: David Kocher Date: Wed, 1 Jan 2025 17:10:38 +0100 Subject: [PATCH] Inline script. --- .github/sync.sh | 24 ------------------------ .github/workflows/CI.yml | 10 +++++----- 2 files changed, 5 insertions(+), 29 deletions(-) delete mode 100755 .github/sync.sh diff --git a/.github/sync.sh b/.github/sync.sh deleted file mode 100755 index 00d7e6b7..00000000 --- a/.github/sync.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2002-2021 iterate GmbH. All rights reserved. -# https://cyberduck.io/ -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# - -TARGET=s3:/github-cyberduck-docs/ -DIRECTORY=$1 -[ ! $DIRECTORY ] && exit 1 - -echo "Upload $DIRECTORY to $TARGET" -duck -y --username $AWS_ACCESS_KEY_ID --password $AWS_SECRET_ACCESS_KEY --existing compare --upload "$TARGET" $DIRECTORY/* --region eu-west-1 -echo "Purging $TARGET CDN configuration" -duck -y --username $AWS_ACCESS_KEY_ID --password $AWS_SECRET_ACCESS_KEY --purge "$TARGET/" diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7b91235f..bc7c1360 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -45,8 +45,8 @@ jobs: sudo apt-get update sudo apt-get -y install duck - name: Deploy - run: .github/sync.sh ./_build/dirhtml - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} + run: | + echo "Upload ./_build/dirhtml" + duck -y --username ${{ secrets.AWS_ACCESS_KEY_ID }} --password ${{ secrets.AWS_SECRET_ACCESS_KEY }} --existing compare --upload s3:/github-cyberduck-docs/ ./_build/dirhtml/* --region ${{ secrets.AWS_DEFAULT_REGION }} + echo "Purging CDN configuration" + duck -y --username ${{ secrets.AWS_ACCESS_KEY_ID }} --password ${{ secrets.AWS_SECRET_ACCESS_KEY }} --purge s3:/github-cyberduck-docs/