Skip to content

Commit 221edc3

Browse files
committed
ci: init
1 parent 2d4ec0f commit 221edc3

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

.github/workflows/pages.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy to github pages
2+
on:
3+
push:
4+
branches: ["main"]
5+
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Setup Pages
24+
uses: actions/configure-pages@v5
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
- run: npm ci
29+
- run: npm run bundle
30+
- run: |
31+
mkdir -p dist
32+
mv out/ dist/
33+
mv index.html dist/
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: dist/
38+
39+
deploy:
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
runs-on: ubuntu-latest
44+
needs: build
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"typescript": "^4.0.0"
77
},
88
"scripts": {
9-
"watch": "gulp watch"
9+
"gulp": "gulp",
10+
"watch": "gulp watch",
11+
"bundle": "gulp bundle"
1012
},
1113
"dependencies": {
1214
"@types/reveal.js": "^5.0.4",

0 commit comments

Comments
 (0)