GitHub Actions #30348
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 | |
on: | |
schedule: | |
- cron: "0 * * * *" | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
env: | |
TZ: Asia/Shanghai | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Node Install | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 15.12.0 | |
- name: Npm Install | |
run: npm install | |
- name: Node Start | |
run: node node/app.js | |
- name: React Build | |
run: npm run build | |
- name: Github Page | |
uses: JamesIves/github-pages-deploy-action@4.1.1 | |
with: | |
BRANCH: gh-pages | |
FOLDER: build | |
env: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
- name: Github Push | |
run: | | |
git config --global user.email "qq1092672755@gmail.com" | |
git config --global user.name "强子" | |
git add . | |
git commit -m "自动化提交" | |
git push origin master -f |