Skip to content

Commit 22300c1

Browse files
committed
Create deploy.yml
1 parent 7ce0154 commit 22300c1

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy React App to GitHub Pages
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v3
11+
- name: Setup Node.js
12+
uses: actions/setup-node@v3
13+
with:
14+
node-version: 18
15+
- name: Install dependencies
16+
run: cd logic-editor && npm install
17+
- name: Build React app
18+
run: cd logic-editor && npm run build
19+
- name: Upload artifact
20+
uses: actions/upload-pages-artifact@v1
21+
with:
22+
path: logic-editor/build/ # Path to built files
23+
deploy:
24+
needs: build
25+
permissions:
26+
pages: write
27+
id-token: write
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Deploy to GitHub Pages
34+
id: deployment
35+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)