Merge pull request #82 from theonlyhanss/patch-5 #69
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: Update Nodes | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
remove_duplicates: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install Node.js and Yarn | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
registry-url: 'https://registry.yarnpkg.com/' | |
- name: Install Dependencies | |
run: yarn install | |
- name: Generate Prisma Client | |
run: npx prisma generate | |
- name: Run TypeScript Script | |
env: | |
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }} | |
TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }} | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
run: yarn start | |
- name: Commit Changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Update Nodes" | |
git push |