feature: 高性能Polaris网关项目-环境搭建-第03节 #1080
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'github actions build and deploy gh-pages' | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.3.1 | |
with: | |
persist-credentials: false | |
# - name: Sync to Gitcode | |
# uses: wearerequired/git-mirror-action@master | |
# env: | |
# SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} | |
# with: | |
# source-repo: git@github.com:binghe001/BingheGuide.git | |
# destination-repo: git@gitcode.net:binghe/binghe.gitcode.host.git | |
- name: install and build | |
run: | | |
export NODE_OPTIONS=--max_old_space_size=8192 | |
npm install | |
npm run build | |
cp README.md .site/ | |
- name: "Deploy Github" | |
uses: s0/git-publish-subdir-action@master | |
env: | |
NODE_OPTIONS: "--max_old_space_size=8192" | |
REPO: git@github.com:binghe001/binghe001.github.io.git | |
BRANCH: master | |
FOLDER: .site | |
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} | |
- name: Sync to Gitcode | |
uses: wearerequired/git-mirror-action@master | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} | |
with: | |
source-repo: git@github.com:binghe001/binghe001.github.io.git | |
destination-repo: git@gitcode.net:binghe/binghe.gitcode.host.git | |
# - name: Sync to Atomgit | |
# uses: wearerequired/git-mirror-action@master | |
# env: | |
# SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} | |
# with: | |
# source-repo: git@github.com:binghe001/binghe001.github.io.git | |
# destination-repo: git@atomgit.com:binghe001/blog.git | |
# - name: "Deploy Gitcode" | |
# uses: s0/git-publish-subdir-action@master | |
# env: | |
# NODE_OPTIONS: "--max_old_space_size=4096" | |
# REPO: git@gitcode.net:binghe/binghe.gitcode.host.git | |
# BRANCH: master | |
# FOLDER: .site | |
# SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_GITCODE_PRIVATE_KEY }} | |
# - name: "Deploy Gitee" | |
# uses: s0/git-publish-subdir-action@master | |
# env: | |
# REPO: git@gitee.com:binghe001/binghe001.git | |
# BRANCH: master | |
# FOLDER: .site | |
# SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_GITEE_PRIVATE_KEY }} | |
# KNOWN_HOSTS_FILE: docs/hosts/known_hosts |