Skip to content

Commit 80b9af8

Browse files
committed
add publish.yaml (workflow)
1 parent d8c5b13 commit 80b9af8

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

.github/workflows/publish.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Publish Portal
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 }}

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)