Skip to content

Commit

Permalink
split update and commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicente Canales committed Oct 24, 2023
1 parent 48356ee commit 7a91514
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/deploy-to-dotorg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ jobs:

# Runs a single command using the runners shell
# This script fetchs the Goolgle Fonts API data and creates a PR if new data is available
- name: Update Google Fonts JSON
- name: Update Google Fonts JSON file
env:
GOOGLE_FONTS_API_KEY: ${{ secrets.GOOGLE_FONTS_API_KEY }}
BRANCH_NAME: update/google-fonts-json-${{ steps.date.outputs.date }}_${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Updating Google fonts JSON"
echo "Updating Google fonts JSON file"
node ./update-google-fonts-json-file.js
- name: Commit Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config --global --add --bool push.autoSetupRemote true
git diff-index --quiet HEAD -- || \
( git add assets/google-fonts/fallback-fonts-list.json && \
git checkout -b ${{ env.BRANCH_NAME }} && \
git commit -m "Update Google Fonts file" --no-verify && \
git push && \
gh pr create -B trunk -H ${{ env.BRANCH_NAME }} --title "Update Google Fonts JSON data from API" --body "Created by Update Google Fonts JSON Github action" && \
gh pr merge --squash ${{ env.BRANCH_NAME }} \
git checkout trunk && \
git commit -m "Automation: update Google Fonts data file" --no-verify && \
git push
)
tag:
name: Checkout repo
Expand Down

0 comments on commit 7a91514

Please sign in to comment.