如何构建一个自己的 GitHub Actions All In One


如何构建一个自己的 GitHub Actions All In One

GitHub Actions

如何构建一个自己的 GitHub Actions All In One

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, 禁止转载

原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/275530.html

(0)
上一篇 2022年7月20日
下一篇 2022年7月20日

相关推荐

发表回复

登录后才能评论