Skip to content

Commit bbe4ae0

Browse files
🔧 Create: deploy workflow
1 parent 2f21326 commit bbe4ae0

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/deploy-gh-pages.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: 'pages'
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
- name: Setup Pages
26+
uses: actions/configure-pages@v3
27+
- name: Setup Node
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: 18
31+
- name: Install dependencies
32+
run: npm install
33+
- name: Build
34+
run: npm ci && npm run build
35+
env:
36+
PUBLIC_URL: /recipe-ai
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v1
39+
with:
40+
path: './dist'
41+
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)