chore:update renovate.json #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
working-directory: htmlparser | |
- name: Format code | |
run: bun run format | |
working-directory: htmlparser | |
- name: Commit formatted code | |
run: | | |
git config user.name 'GitHub Actions' | |
git config user.email "github-actions@example.com" | |
git add . | |
git commit -m 'style:Format code' || echo 'No changes to commit' | |
- name: Push formatted code | |
if: success() | |
run: | | |
git push | |
test: | |
needs: format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
working-directory: htmlparser | |
- name: Run tests | |
run: bun run test | |
working-directory: htmlparser | |
deploy: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Deploy | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CF_TOKEN }} | |
workingDirectory: htmlparser |