Skip to content

store

store #92

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Vite
on:
push:
branches: [ "v2-master" ]
pull_request:
branches: [ "v2-master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Yarn build
run: |
cp .github/workflow-artifacts/Dockerfile ./
cp .github/workflow-artifacts/nginx-custom.conf ./
ls -ltr
ls -l ./public
echo "window._env_ = { VUE_APP_API_URL: 'https://amiya-bot-service.hsyhhssyy.net' };" > ./public/config.js
yarn install --frozen-lockfile
yarn build
- name: Login to Private Harbor
uses: docker/login-action@v2
with:
registry: harbor.hsyhhssyy.net
username: [email protected]
password: ${{ secrets.HARBOR_PUSH_KEY }}
- name: Build and push Docker images
uses: docker/[email protected]
with:
context: .
push: true
tags: harbor.hsyhhssyy.net/home-esxi/amiyabot-minigame-center-website:${{ github.sha }}
- name: Setup kubectl
uses: azure/setup-kubectl@v3
id: install
- name: Write Context
uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.HOMECLOUD_KUBECONFIG }}
id: setcontext
- name: Push to k8s
uses: Azure/k8s-deploy@v4
with:
namespace: amiya-bot
manifests: .github/workflow-artifacts/deployment.test.yaml
images: |
harbor.hsyhhssyy.net/home-esxi/amiyabot-minigame-center-website:${{ github.sha }}
imagepullsecrets: harbor.hsyhhssyy.net