Skip to content

refactor: enhance price handling and visibility logic - Updated syste… #12

refactor: enhance price handling and visibility logic - Updated syste…

refactor: enhance price handling and visibility logic - Updated syste… #12

Workflow file for this run

name: Build and Commit
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build the script
run: npm run build
- name: Check for changes
id: verify-changed-files
run: |
if [ -n "$(git status --porcelain dist/)" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.verify-changed-files.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add dist/
git commit -m "build: Generate minified script [skip ci]"
git push
- name: Display CDN URL
if: steps.verify-changed-files.outputs.changed == 'true'
run: |
echo "✅ Script updated and available via jsDelivr CDN:"
echo "📋 https://cdn.jsdelivr.net/gh/rfmarcelino/propsync@master/dist/propsync.js"