Delete .github
Browse files
.github/workflows/deploy.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
| 1 |
-
name: Automatic Deployement to huggingface_hub
|
| 2 |
-
|
| 3 |
-
on:
|
| 4 |
-
push:
|
| 5 |
-
branches: [master]
|
| 6 |
-
|
| 7 |
-
jobs:
|
| 8 |
-
deploy:
|
| 9 |
-
runs-on: ubuntu-latest
|
| 10 |
-
steps:
|
| 11 |
-
- uses: actions/checkout@v3
|
| 12 |
-
- uses: actions/setup-python@v4
|
| 13 |
-
with:
|
| 14 |
-
python-version: "3.10"
|
| 15 |
-
- run: pip install huggingface_hub
|
| 16 |
-
- run: |
|
| 17 |
-
python -c "
|
| 18 |
-
from huggingface_hub import HfApi
|
| 19 |
-
api = HfApi(token='${{ secrets.HF_TOKEN }}')
|
| 20 |
-
api.upload_folder(
|
| 21 |
-
folder_path='.',
|
| 22 |
-
repo_id='DavidRambeau/bloc3_Streamlit',
|
| 23 |
-
repo_type='space'
|
| 24 |
-
)
|
| 25 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/neon_workflow.yml
DELETED
|
@@ -1,97 +0,0 @@
|
|
| 1 |
-
name: Create/Delete Branch for Pull Request
|
| 2 |
-
|
| 3 |
-
on:
|
| 4 |
-
pull_request:
|
| 5 |
-
types:
|
| 6 |
-
- opened
|
| 7 |
-
- reopened
|
| 8 |
-
- synchronize
|
| 9 |
-
- closed
|
| 10 |
-
|
| 11 |
-
concurrency:
|
| 12 |
-
group: ${{ github.workflow }}-${{ github.ref }}
|
| 13 |
-
|
| 14 |
-
jobs:
|
| 15 |
-
setup:
|
| 16 |
-
name: Setup
|
| 17 |
-
outputs:
|
| 18 |
-
branch: ${{ steps.branch_name.outputs.current_branch }}
|
| 19 |
-
runs-on: ubuntu-latest
|
| 20 |
-
steps:
|
| 21 |
-
- name: Get branch name
|
| 22 |
-
id: branch_name
|
| 23 |
-
uses: tj-actions/branch-names@v8
|
| 24 |
-
|
| 25 |
-
create_neon_branch:
|
| 26 |
-
name: Create Neon Branch
|
| 27 |
-
outputs:
|
| 28 |
-
db_url: ${{ steps.create_neon_branch_encode.outputs.db_url }}
|
| 29 |
-
db_url_with_pooler: ${{ steps.create_neon_branch_encode.outputs.db_url_with_pooler }}
|
| 30 |
-
needs: setup
|
| 31 |
-
if: |
|
| 32 |
-
github.event_name == 'pull_request' && (
|
| 33 |
-
github.event.action == 'synchronize'
|
| 34 |
-
|| github.event.action == 'opened'
|
| 35 |
-
|| github.event.action == 'reopened')
|
| 36 |
-
runs-on: ubuntu-latest
|
| 37 |
-
steps:
|
| 38 |
-
- name: Get branch expiration date as an env variable (2 weeks from now)
|
| 39 |
-
id: get_expiration_date
|
| 40 |
-
run: echo "EXPIRES_AT=$(date -u --date '+14 days' +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_ENV"
|
| 41 |
-
- name: Create Neon Branch
|
| 42 |
-
id: create_neon_branch
|
| 43 |
-
uses: neondatabase/create-branch-action@v6
|
| 44 |
-
with:
|
| 45 |
-
project_id: ${{ vars.NEON_PROJECT_ID }}
|
| 46 |
-
branch_name: preview/pr-${{ github.event.number }}-${{ needs.setup.outputs.branch }}
|
| 47 |
-
api_key: ${{ secrets.NEON_API_KEY }}
|
| 48 |
-
expires_at: ${{ env.EXPIRES_AT }}
|
| 49 |
-
|
| 50 |
-
# The step above creates a new Neon branch.
|
| 51 |
-
# You may want to do something with the new branch, such as run migrations, run tests
|
| 52 |
-
# on it, or send the connection details to a hosting platform environment.
|
| 53 |
-
# The branch DATABASE_URL is available to you via:
|
| 54 |
-
# "${{ steps.create_neon_branch.outputs.db_url_with_pooler }}".
|
| 55 |
-
# It's important you don't log the DATABASE_URL as output as it contains a username and
|
| 56 |
-
# password for your database.
|
| 57 |
-
# For example, you can uncomment the lines below to run a database migration command:
|
| 58 |
-
# - name: Run Migrations
|
| 59 |
-
# run: npm run db:migrate
|
| 60 |
-
# env:
|
| 61 |
-
# # to use pooled connection
|
| 62 |
-
# DATABASE_URL: "${{ steps.create_neon_branch.outputs.db_url_with_pooler }}"
|
| 63 |
-
# # OR to use unpooled connection
|
| 64 |
-
# # DATABASE_URL: "${{ steps.create_neon_branch.outputs.db_url }}"
|
| 65 |
-
|
| 66 |
-
# Following the step above, which runs database migrations, you may want to check
|
| 67 |
-
# for schema changes in your database. We recommend using the following action to
|
| 68 |
-
# post a comment to your pull request with the schema diff. For this action to work,
|
| 69 |
-
# you also need to give permissions to the workflow job to be able to post comments
|
| 70 |
-
# and read your repository contents. Add the following permissions to the workflow job:
|
| 71 |
-
#
|
| 72 |
-
# permissions:
|
| 73 |
-
# contents: read
|
| 74 |
-
# pull-requests: write
|
| 75 |
-
#
|
| 76 |
-
# You can also check out https://github.com/neondatabase/schema-diff-action for more
|
| 77 |
-
# information on how to use the schema diff action.
|
| 78 |
-
# You can uncomment the lines below to enable the schema diff action.
|
| 79 |
-
# - name: Post Schema Diff Comment to PR
|
| 80 |
-
# uses: neondatabase/schema-diff-action@v1
|
| 81 |
-
# with:
|
| 82 |
-
# project_id: ${{ vars.NEON_PROJECT_ID }}
|
| 83 |
-
# compare_branch: preview/pr-${{ github.event.number }}-${{ needs.setup.outputs.branch }}
|
| 84 |
-
# api_key: ${{ secrets.NEON_API_KEY }}
|
| 85 |
-
|
| 86 |
-
delete_neon_branch:
|
| 87 |
-
name: Delete Neon Branch
|
| 88 |
-
needs: setup
|
| 89 |
-
if: github.event_name == 'pull_request' && github.event.action == 'closed'
|
| 90 |
-
runs-on: ubuntu-latest
|
| 91 |
-
steps:
|
| 92 |
-
- name: Delete Neon Branch
|
| 93 |
-
uses: neondatabase/delete-branch-action@v3
|
| 94 |
-
with:
|
| 95 |
-
project_id: ${{ vars.NEON_PROJECT_ID }}
|
| 96 |
-
branch: preview/pr-${{ github.event.number }}-${{ needs.setup.outputs.branch }}
|
| 97 |
-
api_key: ${{ secrets.NEON_API_KEY }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|