Spaces:
Running
Running
Create start.sh
Browse files
start.sh
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# ⚠️ This is a bad idea
|
| 3 |
+
# PROBLEM 1: How do you get the token?
|
| 4 |
+
# You would have to save your GITHUB_TOKEN as a plain-text HF Secret.
|
| 5 |
+
# This is very insecure!
|
| 6 |
+
git clone https://$GITHUB_TOKEN@github.com//$GITHUB_REPO.git .
|
| 7 |
+
|
| 8 |
+
npm install -g npm@latest
|
| 9 |
+
# Install dependencies
|
| 10 |
+
npm install
|
| 11 |
+
# Or, if you already cloned in the Dockerfile, you'd do a pull:
|
| 12 |
+
# This still needs the token to be saved as a secret.
|
| 13 |
+
git pull
|
| 14 |
+
|
| 15 |
+
# Then run your app
|
| 16 |
+
npm start
|