如何构建一个自己的 GitHub Actions All In One
作者:互联网
如何构建一个自己的 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, 禁止转载
标签:GitHub,deploy,actions,github,构建,Actions,https,action,com 来源: https://www.cnblogs.com/xgqfrms/p/16496361.html