Merge pull request #75 from kubesphere/add_dockerfile_and_actions

add dockerfile and github workflows
This commit is contained in:
zryfish 2020-06-20 23:47:54 +08:00 committed by GitHub
commit 6c2a4be73b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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/