-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.7 KB
/
Copy pathmain.yml
File metadata and controls
60 lines (47 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deploy to GitHub Pages
on:
push:
branches:
- master
jobs:
test-build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install
run: |
bun install --frozen-lockfile
- name: Type check
run: |
bun run check
- name: Unit tests
run: |
bun run test
# Los tests end-to-end son los únicos que comprueban de verdad el modo
# offline: hacen falta un service worker y una red que se pueda cortar.
- name: Install browser
run: |
bunx playwright install --with-deps chromium
- name: End-to-end tests
run: |
bun run test:e2e
- name: Build 🔧
run: |
bun run build
- name: Change base-tag in index.html from / to dictionary
run: sed -i 's/<base href="\/" \/>/<base href="\/dictionary\/" \/>/g' build/index.html
- name: Generate build info
run: |
echo "{\"sha\": \"${{ github.sha }}\", \"ref\": \"${{ github.ref_name }}\", \"actor\": \"${{ github.actor }}\"}" > build/build-info.json
- name: Generate .nojekyll
run: |
echo "" > build/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build