Skip to content

Commit 45ef267

Browse files
committed
update docker file and add ci pipeline
1 parent 3b61529 commit 45ef267

File tree

3 files changed

+112
-0
lines changed

3 files changed

+112
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build and Deploy to GitHub Container Registry
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
workflow_dispatch:
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
build-and-push:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Log in to the Container registry
24+
if: github.event_name != 'pull_request'
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Extract metadata (tags, labels)
32+
id: meta
33+
uses: docker/metadata-action@v5
34+
with:
35+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
36+
tags: |
37+
type=ref,event=tag
38+
type=semver,pattern={{version}}
39+
type=semver,pattern={{major}}.{{minor}}
40+
type=raw,value=latest,enable={{is_default_branch}}
41+
42+
- name: Build and push Docker image
43+
uses: docker/build-push-action@v5
44+
with:
45+
context: .
46+
push: true
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}
49+
cache-from: type=gha
50+
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ RUN npm install
1313
# Copy the rest of the application files
1414
COPY . .
1515

16+
# Copy the example config.yml to the root for Vite to process
17+
COPY examples/config.yml ./config.yml
18+
1619
# Build the Vite app for production
1720
RUN npm run build
1821

config.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# links will be created from these properties
2+
relationProperties:
3+
- "http://schema.org/affiliation"
4+
- "http://schema.org/dataPublished"
5+
- "http://schema.org/dateModified"
6+
- "http://schema.org/provider"
7+
- "http://schema.org/license"
8+
- "http://schema.org/publisher"
9+
- "http://schema.org/author"
10+
- "http://schema.org/creator"
11+
- "http://schema.org/keywords"
12+
13+
# labels will be created from these properties
14+
labelProperties:
15+
- "http://schema.org/name"
16+
- "http://schema.org/text"
17+
- "http://schema.org/comment"
18+
19+
# groups will be created from these properties
20+
groups:
21+
- name: 'Organization'
22+
types:
23+
- 'http://schema.org/Organization'
24+
properties:
25+
- 'http://schema.org/affiliation'
26+
- 'http://schema.org/provider'
27+
- 'http://schema.org/publisher'
28+
color: '#008000'
29+
- name: 'Person'
30+
types:
31+
- 'http://schema.org/Person'
32+
properties:
33+
- 'http://schema.org/author'
34+
- 'http://schema.org/creator'
35+
color: '#FF0000'
36+
- name: 'Dataset'
37+
types:
38+
- 'http://schema.org/Dataset'
39+
color: '#0000FF'
40+
- name: 'Software'
41+
types:
42+
- 'http://schema.org/SoftwareSourceCode'
43+
color: '#FFFF00'
44+
- name: 'Document'
45+
types:
46+
- 'http://schema.org/Document'
47+
color: '#FFA500'
48+
- name: 'Article'
49+
types:
50+
- 'http://schema.org/Article'
51+
color: '#4B0082'
52+
- name: 'CreativeWork'
53+
types:
54+
- 'http://schema.org/CreativeWork'
55+
color: '#8A2BE2'
56+
- name: 'Service'
57+
types:
58+
- 'http://schema.org/Service'
59+
color: '#00FFFF'

0 commit comments

Comments
 (0)