Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create SQLite automatically using sqlite-utils #4

Open
rtanglao opened this issue Nov 23, 2023 · 1 comment
Open

Create SQLite automatically using sqlite-utils #4

rtanglao opened this issue Nov 23, 2023 · 1 comment
Assignees

Comments

@rtanglao
Copy link
Collaborator

rtanglao commented Nov 23, 2023

name: Vercel

on:
  workflow_dispatch:

jobs:
  deployment:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v3
      - name: Setup Python
        id: python
        uses: actions/setup-python@v4
        with:
          python-version: "3.11"
      - name: Install Dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
      - name: Download Excel SpreedSheet
        run: curl -Lo excel.xlsx https://docs.google.com/spreadsheets/d/1by2mZB4-ixVfRAu-_mcRxyQEJGuSfbzPkh-AlrUPCLY/export?format=xlsx
      - name: Download CSV
        run: curl -Lo collection.csv https://docs.google.com/spreadsheets/d/1by2mZB4-ixVfRAu-_mcRxyQEJGuSfbzPkh-AlrUPCLY/export?format=csv
      - name: Create SQLite Database
        run: sqlite-utils insert collection.db collection collection.csv --csv
      - name: Deploy to Vercel
        env:
          VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
        run: |-
          datasette publish vercel collection.db \
            --branch main \
            --metadata metadata.json \
            --token $VERCEL_TOKEN \
            --project naruto-shippuden-datasette-stefan-dev-de \
            --install datasette-graphql \
            --public
      - name: Delete Previous Release
        continue-on-error: true
        run: gh release delete latest --cleanup-tag --yes
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Create Release
        run: |-
          gh release create latest \
            --latest \
            --title "Release" \
            --notes "**Version**: $(date +"%Y%m%d")-git-${GITHUB_SHA:0:7}" \
            "excel.xlsx"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@rtanglao
Copy link
Collaborator Author

@rtanglao rtanglao self-assigned this Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant