Skip to content

Commit d6369ce

Browse files
committed
ci: add github pages deploy.
1 parent 68bc467 commit d6369ce

File tree

2 files changed

+41
-6
lines changed

2 files changed

+41
-6
lines changed

.github/workflows/actions.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: GitHub Actions
22

33
on:
4-
pull_request:
5-
branches:
6-
- main
7-
push:
8-
branches:
9-
- main
4+
# pull_request:
5+
# branches:
6+
# - main
7+
# push:
8+
# branches:
9+
# - main
1010

1111
jobs:
1212
build:

.github/workflows/deploy.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy
2+
3+
on:
4+
repository_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
# Build job
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: denoland/setup-deno@v2
15+
with:
16+
deno-version: v2.x
17+
- run: deno install
18+
- run: deno run build
19+
- name: Upload static files as artifact
20+
id: deployment
21+
uses: actions/upload-pages-artifact@v3
22+
with:
23+
path: dist/
24+
25+
# Deployment job
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
needs: build
32+
steps:
33+
- name: Deploy to GitHub Pages
34+
id: deployment
35+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)