Skip to content

Merge pull request #61 from superneko160/renovate/minor-and-patch-dep… #66

Merge pull request #61 from superneko160/renovate/minor-and-patch-dep…

Merge pull request #61 from superneko160/renovate/minor-and-patch-dep… #66

Workflow file for this run

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