Files
admin-ui/.gitea/workflows/deploy.yaml
张斌 d4680d258c
Some checks failed
部署 admin-ui 到 K3s / deploy (push) Failing after 5s
https证书替换
2026-06-02 18:09:49 +08:00

35 lines
860 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: 部署 admin-ui 到 K3s
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: 拉取代码
uses: actions/checkout@v4
# 直接在系统里安装 kubectl国内镜像绝对不超时
- name: 安装 kubectl
run: |
curl -LO https://cdn.dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl
chmod +x kubectl
mv kubectl /usr/local/bin/
kubectl version --client
# 配置 K3s 访问
- name: 配置 Kubeconfig
run: |
mkdir -p ~/.kube
echo "${{ secrets.KUBECONFIG_CONTENT }}" > ~/.kube/config
chmod 600 ~/.kube/config
# 部署
- name: 部署到 K3s
run: |
kubectl apply -f k8s/
kubectl rollout restart deployment admin-ui -n kubernetes-dashboard