Generate and Deploy #242
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: Generate and Deploy | |
on: | |
workflow_dispatch: | |
inputs: | |
url: | |
description: 'URL for the Crypto Scam Database' | |
required: true | |
type: string | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'pnpm' | |
- run: pnpm install | |
- run: pnpm run generate | |
env: | |
CRYPTO_SCAM_DB_URL: ${{ inputs.url }} | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'providers' | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: providers/ | |
deploy: | |
runs-on: ubuntu-latest | |
needs: generate | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/deploy-pages@v1 |