Skip to content

Commit 81fcefe

Browse files
authored
Create deploy-ghp.yml
1 parent 6443727 commit 81fcefe

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/deploy-ghp.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Author: khromov @ https://github.com/khromov
2+
name: Deploy build to GitHub Pages
3+
4+
on:
5+
push:
6+
branches: ['main']
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: 'pages'
18+
cancel-in-progress: false
19+
20+
jobs:
21+
deploy:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v5
31+
- name: Use Node.js
32+
uses: actions/setup-node@v2
33+
with:
34+
node-version: 24
35+
- name: Install dependencies
36+
run: npm ci
37+
- name: Build the code
38+
run: npm run build
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
# Upload entire repository
43+
path: 'build'
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)