如何构建一个自己的 GitHub Actions All In One
GitHub Actions
demo
https://github.com/JamesIves/github-pages-deploy-action/blob/dev/src/lib.ts
https://github.com/JamesIves/github-pages-deploy-action/blob/dev/package.json
核心依赖
@actions/core
"dependencies": {
"@actions/core": "1.9.0",
"@actions/exec": "1.1.1",
"@actions/github": "5.0.3",
"@actions/io": "1.1.2"
},
https://github.com/JamesIves/github-pages-deploy-action/blob/dev/action.yml
https://github.com/JamesIves/github-pages-deploy-action/blob/dev/.github/workflows/deploy.yml
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v2
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BASE_BRANCH: master # The branch the action should deploy from.
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.
BUILD_SCRIPT: npm install && npm run-script build # The build script the action should run prior to deploying.
refs
https://docs.github.com/en/actions/deployment/about-deployments/deploying-with-github-actions
https://docs.github.com/en/actions/guides
https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
https://www.ruanyifeng.com/blog/2019/09/getting-started-with-github-actions.html
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。