如何构建一个自己的 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


Flag Counter


©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载

相关文章

developer-roadmap —— 提供最全的开发者技术路线指南。前端...
一个极简的文件分享工具,无需注册且没有广告即可生成共享下...
收集 Github、Gitee优秀的开源项目,并进行归类整理。项目地...
大家好,我是 Java陈序员,我们有时会搭建一个属于自己的网站...
一个提供交互式的Web UI用于生成兼容MyBatisPlus框架的相关功...
大家好,我是 Java 陈序员。权限认证是我们日常开发绕不过的...