From e666285b5d0ddb495bc7ea6c931f1a7710328bc7 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 20 Jun 2020 23:46:18 +0800 Subject: [PATCH] add dockerfile and github workflows --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ Dockerfile | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..cd34dea6b --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..966fdaf8b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM nginx:alpine +COPY public/ /usr/share/nginx/html/