remove CNAME #37
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: UESTC-MSC Blog Site CI | |
on: | |
push: | |
branches: | |
- Root | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js 8.10.0 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 8.10.0 | |
- name: npm install and modify | |
run: | | |
npm install | |
cp themes/uestc-msc/asset/post_asset.js node_modules/hexo/lib/models/post_asset.js | |
sudo timedatectl set-timezone Asia/Shanghai | |
- name: login ssh and git | |
env: | |
id_rsa_github_action: ${{ secrets.id_rsa_github_action }} | |
run: | | |
mkdir ~/.ssh | |
echo -e "Host github.com\nStrictHostKeyChecking no\nIdentityFile ~/.ssh/id_rsa_github_action" > ~/.ssh/config | |
echo -e "$id_rsa_github_action" > ~/.ssh/id_rsa_github_action | |
chmod 600 ~/.ssh/id_rsa_github_action | |
git config --global user.email "LeoJHon.Song@outlook.com" | |
git config --global user.name "GitHub Action" | |
- name: Generate and deploy blog site | |
run: | | |
rm -rf .deploy_git | |
git clone -b master git@github.com:uestc-msc/uestc-msc.github.io.git .deploy_git | |
git clone -b master git@github.com:uestc-msc/uestc-msc.github.io.git public | |
rm -rf public/.git | |
./h d -g |