add dockerfile and github workflows

This commit is contained in:
Jeff 2020-06-20 23:46:18 +08:00
parent e0fb9ae5f8
commit e666285b5d
No known key found for this signature in database
GPG Key ID: 87272103ED9C5218
2 changed files with 34 additions and 0 deletions

32
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: KubeSphere Website
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.71.1'
- name: Build
run: hugo --minify
- name: Build and Push image
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: kubesphere/website
tags: latest

2
Dockerfile Normal file
View File

@ -0,0 +1,2 @@
FROM nginx:alpine
COPY public/ /usr/share/nginx/html/