Skip to content

Commit

Permalink
fix: workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanshuyou committed Sep 4, 2024
1 parent 3688e59 commit bd19e78
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
repository_dispatch:
types: [prod-deploy]
push:
branches:
- master
paths-ignore:
- "preview/**.md"
workflow_dispatch:
Expand All @@ -30,7 +28,7 @@ jobs:
- name: Check for new files
id: check-new-files
run: |
new_files=$(git diff --name-status HEAD~1 HEAD | grep '^A' | awk '{print $2}' | grep '^v2\.4\.x/.*\.md$')
new_files=$(git diff --name-status HEAD~1 HEAD -- | grep '^A' | awk '{print $2}' | grep '^v2\.4\.x/.*\.md$')
if [ -z "$new_files" ]; then
echo "No new files detected."
echo "::set-output name=new_files_detected::false"
Expand All @@ -49,7 +47,7 @@ jobs:
if: steps.check-new-files.outputs.new_files_detected == 'true'
run: |
echo "New file detected, running script..."
touch .env
echo DEEPL_API_KEY=${{secrets.DEEPL_API_KEY}} >> .env
echo GITHUB_TOKEN=${{secrets.GH_TOKEN}} >> .env
Expand Down

0 comments on commit bd19e78

Please sign in to comment.