Skip to content

Commit 22f38e0

Browse files
committed
Github pages action
1 parent 6b192a0 commit 22f38e0

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/observable.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy Observable Framework Site in Github Pages
2+
3+
on:
4+
# Run whenever key files in branch main are pushed
5+
push:
6+
branches: [main]
7+
paths:
8+
- 'src/**'
9+
- 'observablehq.config.js'
10+
- 'package-lock.json'
11+
- 'package.json'
12+
13+
# Run this workflow once per day, at 10:15 UTC
14+
# schedule: [{cron: "15 10 * * *"}]
15+
16+
# Run this workflow when triggered manually in GitHub’s UI.
17+
workflow_dispatch: {}
18+
19+
jobs:
20+
deploy:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pages: write
25+
id-token: write
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: 22
34+
cache: npm
35+
- run: npm ci
36+
- run: npm run build
37+
- uses: actions/configure-pages@v4
38+
- uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: dist
41+
- name: Deploy
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)