Skip to content

Commit 58456cb

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

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-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

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

0 commit comments

Comments
 (0)