Update tweet-to-telegram.md #67
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: gh pages deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
name: Build | |
runs-on: ubuntu-18.04 | |
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | |
steps: | |
# correct build machine timezone | |
- run: sudo timedatectl set-timezone Asia/Shanghai | |
# checkout source | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# setup node.js | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
# Cache node_modules, saber cache | |
- name: Cache build | |
uses: actions/cache@v2 | |
env: | |
cache-name: yarn-modules | |
with: | |
path: | | |
node_modules | |
.saber | |
eject | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }} | |
# generate artifacts | |
- run: yarn | |
- run: yarn build | |
# deployment | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
# docs: https://developer.github.com/v3/activity/events/types/#commitcommentevent | |
commit_message: Site updated at ${{ github.event.head_commit.timestamp }} |