@@ -1,13 +1,19 @@
|
||||
name: 自动部署
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
branches: [ master ]
|
||||
jobs:
|
||||
部署应用:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 拉取代码
|
||||
uses: actions/checkout@v4
|
||||
- name: 拉取项目代码
|
||||
run: |
|
||||
rm -rf ./tmpcode
|
||||
git clone $GITEA_REPO_URL tmpcode
|
||||
cd tmpcode
|
||||
cp -rf ./* ../
|
||||
cd ../
|
||||
rm -rf tmpcode
|
||||
- name: k8s部署
|
||||
run: |
|
||||
/usr/local/bin/kubectl apply -f k8s/
|
||||
|
||||
Reference in New Issue
Block a user