Tai*_*aio 33 bash github-actions
createmap.sh我的文件夹中有这个脚本public/scripts。我需要在主部署上运行它,yaml 文件中的代码是
name: create-map
on: push
run: .public/script.sh
runs-on: ubuntu-latest
shell: bash
Run Code Online (Sandbox Code Playgroud)
这是一个简单的脚本,应该创建一个站点地图并 ping google
# yarn sitemap
$ cd public
$ rm -rf sitemap
$ mkdir sitemap
$ cd ..
$ cd scripts
$ node ./sitemap-posts.js
$ node ./compress-map.js
$ node ./create-one-map.js
$ curl http://google.com/ping?sitemap=https://website.com/sitemap.xml
Run Code Online (Sandbox Code Playgroud)
我的文件夹结构是rootdirectory/scripts和rootdirectory/public
当我部署时,脚本未运行,我不知道问题出在哪里
Krz*_*tof 55
需要添加执行权限:
jobs:
run_tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run script file
run: |
chmod +x ./public/scripts/test.sh
./public/scripts/test.sh
shell: bash
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
44755 次 |
| 最近记录: |