|
1 |
| -# .github/workflows/deploy.yml |
| 1 | +# # .github/workflows/deploy.yml |
2 | 2 |
|
3 |
| -name: Deploy React App to GitHub Pages |
| 3 | +# name: Deploy React App to GitHub Pages |
4 | 4 |
|
5 |
| -on: |
6 |
| - push: |
7 |
| - branches: |
8 |
| - - main # Trigger deployment on push to main branch |
| 5 | +# on: |
| 6 | +# push: |
| 7 | +# branches: |
| 8 | +# - main # Trigger deployment on push to main branch |
9 | 9 |
|
10 |
| -jobs: |
11 |
| - build-and-deploy: |
12 |
| - runs-on: ubuntu-latest |
| 10 | +# jobs: |
| 11 | +# build-and-deploy: |
| 12 | +# runs-on: ubuntu-latest |
13 | 13 |
|
14 |
| - steps: |
15 |
| - # 1. Checkout the repository |
16 |
| - - name: Checkout repository |
17 |
| - uses: actions/checkout@v3 |
| 14 | +# steps: |
| 15 | +# # 1. Checkout the repository |
| 16 | +# - name: Checkout repository |
| 17 | +# uses: actions/checkout@v3 |
18 | 18 |
|
19 |
| - # 2. Setup Node.js environment |
20 |
| - - name: Setup Node.js |
21 |
| - uses: actions/setup-node@v3 |
22 |
| - with: |
23 |
| - node-version: "16" # Specify Node.js version |
| 19 | +# # 2. Setup Node.js environment |
| 20 | +# - name: Setup Node.js |
| 21 | +# uses: actions/setup-node@v3 |
| 22 | +# with: |
| 23 | +# node-version: "16" # Specify Node.js version |
24 | 24 |
|
25 |
| - # 3. Install project dependencies |
26 |
| - - name: Install dependencies |
27 |
| - run: npm install |
| 25 | +# # 3. Install project dependencies |
| 26 | +# - name: Install dependencies |
| 27 | +# run: npm install |
28 | 28 |
|
29 |
| - # 4. Build the React app |
30 |
| - - name: Build React app |
31 |
| - run: npm run build |
| 29 | +# # 4. Build the React app |
| 30 | +# - name: Build React app |
| 31 | +# run: npm run build |
32 | 32 |
|
33 |
| - # 5. Deploy to GitHub Pages using PAT and git commands |
34 |
| - - name: Deploy to GitHub Pages |
35 |
| - env: |
36 |
| - DEPLOY_TOKEN: ${{ secrets.WEBSITE_TOKEN }} # Use PAT stored as DEPLOY_TOKEN |
37 |
| - run: | |
38 |
| - set -x |
39 |
| - git config --global user.name "jonhealy1" |
40 |
| - git config --global user.email "[email protected]" |
| 33 | +# # 5. Deploy to GitHub Pages using PAT and git commands |
| 34 | +# - name: Deploy to GitHub Pages |
| 35 | +# env: |
| 36 | +# DEPLOY_TOKEN: ${{ secrets.WEBSITE_TOKEN }} # Use PAT stored as DEPLOY_TOKEN |
| 37 | +# run: | |
| 38 | +# set -x |
| 39 | +# git config --global user.name "jonhealy1" |
| 40 | +# git config --global user.email "[email protected]" |
41 | 41 |
|
42 |
| - # Remove existing deploy remote if it exists to avoid conflicts |
43 |
| - git remote remove deploy || true |
| 42 | +# # Remove existing deploy remote if it exists to avoid conflicts |
| 43 | +# git remote remove deploy || true |
44 | 44 |
|
45 |
| - # Add deploy remote using PAT for authentication |
46 |
| - git remote add deploy https://x-access-token:${DEPLOY_TOKEN}@github.com/stacchain/stacchain.github.io.git |
| 45 | +# # Add deploy remote using PAT for authentication |
| 46 | +# git remote add deploy https://x-access-token:${DEPLOY_TOKEN}@github.com/stacchain/stacchain.github.io.git |
47 | 47 |
|
48 |
| - # Verify remote URLs |
49 |
| - git remote -v |
| 48 | +# # Verify remote URLs |
| 49 | +# git remote -v |
50 | 50 |
|
51 |
| - # Fetch the deploy branch |
52 |
| - git fetch deploy |
| 51 | +# # Fetch the deploy branch |
| 52 | +# git fetch deploy |
53 | 53 |
|
54 |
| - # Checkout to deploy/main or create an orphan branch if it doesn't exist |
55 |
| - git checkout deploy/main || git checkout --orphan deploy/main |
| 54 | +# # Checkout to deploy/main or create an orphan branch if it doesn't exist |
| 55 | +# git checkout deploy/main || git checkout --orphan deploy/main |
56 | 56 |
|
57 |
| - # Remove all existing files |
58 |
| - git rm -rf . |
| 57 | +# # Remove all existing files |
| 58 | +# git rm -rf . |
59 | 59 |
|
60 |
| - # Copy build files to the repository root |
61 |
| - cp -R build/* . |
| 60 | +# # Copy build files to the repository root |
| 61 | +# cp -R build/* . |
62 | 62 |
|
63 |
| - # Add all changes |
64 |
| - git add . |
| 63 | +# # Add all changes |
| 64 | +# git add . |
65 | 65 |
|
66 |
| - # Commit changes |
67 |
| - git commit -m "Deploy React app to GitHub Pages [skip ci]" |
| 66 | +# # Commit changes |
| 67 | +# git commit -m "Deploy React app to GitHub Pages [skip ci]" |
68 | 68 |
|
69 |
| - # Push changes to deploy/main with force |
70 |
| - git push deploy deploy/main --force |
| 69 | +# # Push changes to deploy/main with force |
| 70 | +# git push deploy deploy/main --force |
0 commit comments