Skip to content

Commit dc1458d

Browse files
committed
add publish.yaml
add quality-checks.yml
1 parent d8c5b13 commit dc1458d

File tree

3 files changed

+66
-4
lines changed

3 files changed

+66
-4
lines changed

.github/workflows/publish.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Publish Website
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'README.md'
7+
- 'env.example'
8+
- '.vscode/**'
9+
10+
release:
11+
types: ['published']
12+
13+
jobs:
14+
check-files:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
build-and-push:
20+
permissions:
21+
contents: read
22+
packages: write
23+
id-token: write
24+
25+
runs-on: ubuntu-latest
26+
needs: check-files
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Log in to GitHub Container Registry
32+
uses: docker/[email protected]
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Extract metadata
39+
id: meta
40+
uses: docker/metadata-action@v5
41+
with:
42+
images: ghcr.io/datum-cloud/datum.net
43+
tags: |
44+
type=ref,event=pr
45+
type=ref,event=branch
46+
type=ref,event=branch,suffix=-{{commit_date 'YYYYMMDD-HHmmss'}}
47+
type=semver,pattern=v{{version}}
48+
type=semver,pattern=v{{major}}.{{minor}}
49+
type=semver,pattern=v{{major}}
50+
type=sha
51+
52+
- name: Build Website
53+
id: push
54+
uses: docker/[email protected]
55+
with:
56+
context: .
57+
push: true
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}
60+
target: production

.github/workflows/quality-checks.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ name: Quality Checks
33
on:
44
pull_request:
55
push:
6-
branches: [workflows]
7-
# branches: [main, develop]
6+
branches: [main]
7+
paths-ignore:
8+
- 'README.md'
9+
- 'env.example'
10+
- '.vscode/**'
811

912
concurrency:
1013
group: ${{ github.workflow }}-${{ github.ref }}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"name": "datum-astro-mdx-website",
2+
"name": "datum.net",
33
"type": "module",
4-
"version": "0.0.1",
54
"private": true,
65
"scripts": {
76
"dev": "astro dev --typecheck",

0 commit comments

Comments
 (0)