Spaces:
Runtime error
Runtime error
Maki
commited on
Create deploy.yml
Browse files- .github/workflows/deploy.yml +54 -0
.github/workflows/deploy.yml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Deploy to GitHub Pages
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches:
|
6 |
+
- main
|
7 |
+
pull_request:
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
# Static file deployment test (no build needed)
|
11 |
+
test:
|
12 |
+
runs-on: ubuntu-latest
|
13 |
+
steps:
|
14 |
+
- uses: actions/checkout@v4
|
15 |
+
with:
|
16 |
+
fetch-depth: 0
|
17 |
+
|
18 |
+
- name: Verify files exist
|
19 |
+
run: |
|
20 |
+
echo "Checking required files..."
|
21 |
+
ls -la
|
22 |
+
test -f index.html || (echo "index.html not found" && exit 1)
|
23 |
+
test -d assets || (echo "assets directory not found" && exit 1)
|
24 |
+
echo "All required files found ✅"
|
25 |
+
|
26 |
+
deploy:
|
27 |
+
name: Deploy to GitHub Pages
|
28 |
+
runs-on: ubuntu-latest
|
29 |
+
needs: test
|
30 |
+
if: github.ref == 'refs/heads/main'
|
31 |
+
permissions:
|
32 |
+
contents: read
|
33 |
+
pages: write
|
34 |
+
id-token: write
|
35 |
+
environment:
|
36 |
+
name: github-pages
|
37 |
+
url: ${{ steps.deployment.outputs.page_url }}
|
38 |
+
steps:
|
39 |
+
- uses: actions/checkout@v4
|
40 |
+
with:
|
41 |
+
fetch-depth: 0
|
42 |
+
|
43 |
+
- name: Setup Pages
|
44 |
+
uses: actions/configure-pages@v4
|
45 |
+
|
46 |
+
- name: Upload artifact
|
47 |
+
uses: actions/upload-pages-artifact@v3
|
48 |
+
with:
|
49 |
+
# Upload entire repository for static site
|
50 |
+
path: '.'
|
51 |
+
|
52 |
+
- name: Deploy to GitHub Pages
|
53 |
+
id: deployment
|
54 |
+
uses: actions/deploy-pages@v4
|