name: Update gh-pages on: push: branches: [ master ] paths: - bin/scripts/lib/fonts.json jobs: sync: runs-on: ubuntu-latest steps: - name: Fetch files uses: Bhacaz/checkout-files@v2 with: files: bin/scripts/lib/fonts.json branch: ${{ github.head_ref || github.ref_name }} - name: Prepare file run: | mkdir _data cp bin/scripts/lib/fonts.json _data - name: Fetch gh-pages uses: actions/checkout@v3 with: ref: gh-pages - name: Deploy to gh-pages uses: JamesIves/github-pages-deploy-action@v4 with: folder: _data commit-message: "[ci] Sync fonts.json" git-config-name: GitHub Actions git-config-email: 41898282+github-actions[bot]@users.noreply.github.com clean: false