添加部署文件
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 22s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 22s
This commit is contained in:
parent
36ff3e9eb0
commit
a8aedbeb98
44
.gitea/workflows/deploy.yaml
Normal file
44
.gitea/workflows/deploy.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'prod'
|
||||
|
||||
env:
|
||||
BUILD: staging
|
||||
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: stream9
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: https://gitea.yantootech.com/neil/checkout@v4
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
whoami
|
||||
uname -a
|
||||
pwd
|
||||
ls ${{ gitea.workspace }}
|
||||
- name: Build and push
|
||||
uses: https://gitea.yantootech.com/neil/build-push-action@v6
|
||||
with:
|
||||
push: false
|
||||
tags: gong-zheng-html:${{ gitea.run_id }}
|
||||
- name: Run docker
|
||||
run: |
|
||||
pwd
|
||||
if [ "$(docker ps -q -f name=^gong-zheng-html$)" ]; then
|
||||
docker stop gong-zheng-html
|
||||
fi
|
||||
docker run -d --rm --name gong-zheng-html \
|
||||
-v /usr/share/fonts/opentype/noto:/usr/share/fonts \
|
||||
-p 6216:80 \
|
||||
gong-zheng-html:${{ gitea.run_id }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
# 使用官方 Nginx 镜像
|
||||
FROM nginx:alpine
|
||||
|
||||
# 拷贝所有静态文件到 nginx 默认目录
|
||||
COPY . /usr/share/nginx/html
|
||||
|
||||
# 暴露 80 端口
|
||||
EXPOSE 80
|
||||
|
||||
# 启动 nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@ -184,7 +184,7 @@
|
||||
}
|
||||
let conversationL = ""
|
||||
const sex_audio = {
|
||||
"male": "gongzheng-v4",
|
||||
"male": "gongzheng-v5",
|
||||
"female": "presenter_female"
|
||||
}
|
||||
const audio = document.getElementById('audio')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user