name: DEPLOY CI
on:
push:
branches:
- master
paths-ignore:
- README.md
- LICENSE
jobs:
deploy_job:
runs-on: ubuntu-latest
name: build
steps:
# check out the repository
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: yarn
- name: Build
run: yarn build
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'build'
destination-github-username: ${{ secrets.DESTINATION_GITHUB_NAME }}
destination-repository-name: 'zzzzz'
target-directory: 'xxxx'
user-email: ${{ secrets.UESR_EMAIL }}
target-branch: gh-pages
github action push to another repo
CI/CD流程部署实战
最新推荐文章于 2025-11-17 13:18:06 发布
本文详细介绍了一个具体的CI/CD流程实例,通过GitHub Actions实现代码的自动构建与部署。从代码检出到依赖安装,再到项目构建及最终推送至目标仓库的全过程均有涉及。
6169

被折叠的 条评论
为什么被折叠?



