seata website deploy on github #844
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: seata.io deploy | |
on: | |
push: | |
branches: | |
- docusaurus | |
#This schedule only takes effect in the default branch | |
schedule: | |
- cron: '0 */12 * * *' | |
jobs: | |
Build-Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Build | |
run: | | |
npm install && npm run build && mkdir -p deploy-dist && cp -R build/* deploy-dist/ && mv build .htaccess deploy-dist/ | |
- name: Deploy | |
uses: peaceiris/[email protected] | |
env: | |
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
PUBLISH_BRANCH: gh-pages | |
PUBLISH_DIR: ./deploy-dist | |
with: | |
keepFiles: true |