Skip to content

Commit 127b3b2

Browse files
Revert "PR deploy testing (#35)" (#36)
This reverts commit 1e42b01.
1 parent 1e42b01 commit 127b3b2

File tree

3 files changed

+86
-152
lines changed

3 files changed

+86
-152
lines changed

.github/workflows/deploy.yml

Lines changed: 50 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,50 @@
1-
1 name: Deploy static content to Pages
2-
2
3-
3 on:
4-
4 # Runs on pushes targeting the default branch
5-
5 push:
6-
6 branches: ['main']
7-
7
8-
8 # Allows you to run this workflow manually from the Actions tab
9-
9 workflow_dispatch:
10-
10
11-
11 # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
12-
12 permissions:
13-
13 contents: read
14-
14 pages: write
15-
15 id-token: write
16-
16
17-
17 # Allow one concurrent deployment
18-
18 concurrency:
19-
19 group: 'pages'
20-
20 cancel-in-progress: true
21-
21
22-
22 jobs:
23-
23 # Single deploy job since we're just deploying
24-
24 deploy:
25-
25 environment:
26-
26 name: github-pages-${{ github.event.pull_request.number }}
27-
27 url: ${{ steps.deployment.outputs.page_url }}
28-
28 runs-on: ubuntu-latest
29-
29 steps:
30-
30 - name: Checkout
31-
31 uses: actions/checkout@v4
32-
32 - name: Set up Node
33-
33 uses: actions/setup-node@v4
34-
34 with:
35-
35 node-version: 20
36-
36 cache: 'npm'
37-
37 - name: Install dependencies
38-
38 run: npm ci
39-
39 - name: Build
40-
40 run: npm run build
41-
41 - name: Setup Pages
42-
42 uses: actions/configure-pages@v4
43-
43 - name: Upload artifact
44-
44 uses: actions/upload-pages-artifact@v3
45-
45 with:
46-
46 # Upload dist folder
47-
47 path: './dist'
48-
48 - name: Deploy to GitHub Pages
49-
49 id: deployment
50-
50 uses: actions/deploy-pages@v4
51-
51
52-
52 pr-deploy:
53-
53 if: github.event_name == 'pull_request'
54-
54 environment:
55-
55 name: github-pages-pr-${{ github.event.pull_request.number }}
56-
56 url: ${{ steps.deployment.outputs.page_url }}
57-
57 runs-on: ubuntu-latest
58-
58 steps:
59-
59 - name: Checkout
60-
60 uses: actions/checkout@v4
61-
61 - name: Set up Node
62-
62 uses: actions/setup-node@v4
63-
63 with:
64-
64 node-version: 20
65-
65 cache: 'npm'
66-
66 - name: Install dependencies
67-
67 run: npm ci
68-
68 - name: Build
69-
69 run: npm run build
70-
70 - name: Setup Pages
71-
71 uses: actions/configure-pages@v4
72-
72 - name: Upload artifact
73-
73 uses: actions/upload-pages-artifact@v3
74-
74 with:
75-
75 path: './dist'
76-
76 - name: Deploy to GitHub Pages
77-
77 id: deployment
78-
78 uses: actions/deploy-pages@v4
79-
79
1+
name: Deploy static content to Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ['main']
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow one concurrent deployment
18+
concurrency:
19+
group: 'pages'
20+
cancel-in-progress: true
21+
22+
jobs:
23+
# Single deploy job since we're just deploying
24+
deploy:
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
- name: Set up Node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
cache: 'npm'
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Build
40+
run: npm run build
41+
- name: Setup Pages
42+
uses: actions/configure-pages@v4
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
# Upload dist folder
47+
path: './dist'
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.github/workflows/pr-check.yml

Lines changed: 31 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,31 @@
1-
1 name: PR Check
2-
2
3-
3 on:
4-
4 pull_request:
5-
5 branches: ['main']
6-
6
7-
7 # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
8-
8 permissions:
9-
9 contents: read
10-
10 pages: write
11-
11 id-token: write
12-
12
13-
13 # Allow one concurrent deployment
14-
14 concurrency:
15-
15 group: 'pages'
16-
16 cancel-in-progress: false
17-
17
18-
18 jobs:
19-
19 build:
20-
20 runs-on: ubuntu-latest
21-
21 steps:
22-
22 - name: Checkout
23-
23 uses: actions/checkout@v4
24-
24 - name: Set up Node
25-
25 uses: actions/setup-node@v4
26-
26 with:
27-
27 node-version: 20
28-
28 cache: 'npm'
29-
29 - name: Install dependencies
30-
30 run: npm ci
31-
31 - name: Build
32-
32 run: npm run build
33-
33 - name: Setup Pages
34-
34 uses: actions/configure-pages@v4
35-
35 - name: Upload artifact
36-
36 uses: actions/upload-pages-artifact@v3
37-
37 with:
38-
38 path: './dist'
39-
39 - name: Deploy to GitHub Pages
40-
40 id: deployment
41-
41 uses: actions/deploy-pages@v4
42-
42
43-
43 pr-deploy:
44-
44 if: github.event_name == 'pull_request'
45-
45 environment:
46-
46 name: github-pages-pr-${{ github.event.pull_request.number }}
47-
47 url: ${{ steps.deployment.outputs.page_url }}
48-
48 runs-on: ubuntu-latest
49-
49 steps:
50-
50 - name: Checkout
51-
51 uses: actions/checkout@v4
52-
52 - name: Set up Node
53-
53 uses: actions/setup-node@v4
54-
54 with:
55-
55 node-version: 20
56-
56 cache: 'npm'
57-
57 - name: Install dependencies
58-
58 run: npm ci
59-
59 - name: Build
60-
60 run: npm run build
61-
61 - name: Setup Pages
62-
62 uses: actions/configure-pages@v4
63-
63 - name: Delete existing artifact
64-
64 run: rm -rf ./dist
65-
65 - name: Upload artifact
66-
66 uses: actions/upload-pages-artifact@v3
67-
67 with:
68-
68 path: './dist'
69-
69 - name: Deploy to GitHub Pages
70-
70 id: deployment
71-
71 uses: actions/deploy-pages@v4
1+
name: PR Check
2+
3+
on:
4+
pull_request:
5+
branches: ['main']
6+
7+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
8+
permissions:
9+
contents: read
10+
11+
# Allow one concurrent deployment
12+
concurrency:
13+
group: 'pages'
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Set up Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: 'npm'
27+
- name: Install dependencies
28+
run: npm ci
29+
- name: Build
30+
run: npm run build
31+

src/App.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import './App.css'
23
import LoginForm from './Pages/LoginForm/LoginForm';
34
import Register from './Pages/register/Register';
@@ -8,15 +9,17 @@ import Users from './Pages/Users';
89

910
function App() {
1011
return (
11-
<BrowserRouter basename={process.env.PUBLIC_URL}>
12+
<BrowserRouter basename="/LibraryManagement">
1213
<Routes>
1314
<Route path="/" element={<LandingPage />} />
1415
<Route path="/library/login" element={<LoginForm up='library'/>} />
1516
<Route path="/user/login" element={<LoginForm up='user'/>} />
1617
<Route path='/register' element={<Register/>}/>
1718
<Route path='/librarylist' element={<Librarylist/>}/>
1819
<Route path='/users' element={<Users/>}/>
19-
<Route path='/pr-deploy/:prNumber' element={<LandingPage />} />
20+
21+
22+
2023
</Routes>
2124
</BrowserRouter>
2225
)

0 commit comments

Comments
 (0)