From a8aedbeb987f2bcddec7b6c62d33b4c6f21ae240 Mon Sep 17 00:00:00 2001 From: Song367 <601337784@qq.com> Date: Thu, 19 Jun 2025 16:58:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E7=BD=B2=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yaml | 44 ++++++++++++++++++++++++++++++++++++ Dockerfile | 11 +++++++++ simple.html | 2 +- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/deploy.yaml create mode 100644 Dockerfile diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..2a0d0ed --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -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 }}." \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..807affe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +# ไฝฟ็”จๅฎ˜ๆ–น Nginx ้•œๅƒ +FROM nginx:alpine + +# ๆ‹ท่ดๆ‰€ๆœ‰้™ๆ€ๆ–‡ไปถๅˆฐ nginx ้ป˜่ฎค็›ฎๅฝ• +COPY . /usr/share/nginx/html + +# ๆšด้œฒ 80 ็ซฏๅฃ +EXPOSE 80 + +# ๅฏๅŠจ nginx +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/simple.html b/simple.html index 678e4cf..dec2fce 100644 --- a/simple.html +++ b/simple.html @@ -184,7 +184,7 @@ } let conversationL = "" const sex_audio = { - "male": "gongzheng-v4", + "male": "gongzheng-v5", "female": "presenter_female" } const audio = document.getElementById('audio')