From 33424053c1e111369e865f076df0a9131a24b961 Mon Sep 17 00:00:00 2001 From: Chris Reddington <791642+chrisreddington@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:14:22 +0000 Subject: [PATCH] Cleanup workflows --- .github/workflows/crosspost.yml | 74 --------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 .github/workflows/crosspost.yml diff --git a/.github/workflows/crosspost.yml b/.github/workflows/crosspost.yml deleted file mode 100644 index b410c887..00000000 --- a/.github/workflows/crosspost.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Cross Poster -on: - push: - branches: - - main -jobs: - crosspost-episode: - runs-on: ubuntu-latest - if: "contains(github.event.head_commit.message, '[crosspost]')" - environment: - name: production.crosspost - steps: - - name: Download markdown files that are different from prior commit - run: | - subfolder='content/episode/' - git clone --config lfs.fetchexclude="/podcast_audio" https://github.com/CloudWithChris/cloudwithchris.com.git ./ - fileschanged=$(git diff --name-only HEAD^ HEAD -- "$subfolder/*.md") - echo "$fileschanged" > files.txt - cd $subfolder - - sed -i -e "s#$subfolder##g" ../../files.txt - for i in *; do - if ! grep -qxFe "$i" ../../files.txt - then - echo "Deleting: $i" - rm "$i" - fi - done - - uses: chrisreddington/hugocrossposter@main - with: - directoryPath: 'content/episode' - recursiveSubdirectories: 'true' - originalPostInformation: 'true' - logPayloadOutput: 'true' - searchPattern: '*.md' - baseUrl: 'www.cloudwithchris.com' - devtoToken: ${{ secrets.DEVTO_INTEGRATION_TOKEN }} - mediumAuthorId: ${{ secrets.MEDIUM_AUTHOR_ID }} - mediumToken: ${{ secrets.MEDIUM_TOKEN }} - protocol: 'https' - crosspost-blog: - if: "contains(github.event.head_commit.message, '[crosspost]')" - runs-on: ubuntu-latest - environment: - name: production.crosspost - steps: - - name: Download markdown files that are different from prior commit - run: | - subfolder='content/blog/' - git clone --config lfs.fetchexclude="/podcast_audio" https://github.com/CloudWithChris/cloudwithchris.com.git ./ - fileschanged=$(git diff --name-only HEAD^ HEAD -- "$subfolder/*.md") - echo "$fileschanged" > files.txt - cd $subfolder - escaped_subfolder=$(printf '%s\n' "$subfolder/" | sed 's:[][\\/.^$*]:\\&:g') - sed -i -e "s#$subfolder##g" ../../files.txt - for i in *; do - if ! grep -qxFe "$i" ../../files.txt - then - echo "Deleting: $i" - rm "$i" - fi - done - - uses: chrisreddington/hugocrossposter@main - with: - directoryPath: 'content/blog' - recursiveSubdirectories: 'true' - originalPostInformation: 'true' - logPayloadOutput: 'true' - searchPattern: '*.md' - baseUrl: 'www.cloudwithchris.com' - devtoToken: ${{ secrets.DEVTO_INTEGRATION_TOKEN }} - mediumAuthorId: ${{ secrets.MEDIUM_AUTHOR_ID }} - mediumToken: ${{ secrets.MEDIUM_TOKEN }} - protocol: 'https'