# .gitea/workflows/deploy.yml name: deploy demo on: push: branches: - "main" # 针对 main 分支 paths: - ".gitea/workflows/*" # 表示推送到main分支 并且以下文件进行了修改才会执行 - "src/**" - "package.json" jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # 第三方的 action - name: create a folder # 创建文件夹 run: mkdir test-folder - name: create a file # 创建一个文件 run: | # 这样下面就可以执行多行 cd test-folder touch a.txt echo "hello world 123" > a.txt cat a.txt - name: delete a file # 删除文件 run: rm -rf a.txt