Skip to content

Update.

Update. #157

Workflow file for this run

# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Blog Site Deploy
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout blog code
uses: actions/checkout@v2
- name: Checkout blog site
uses: actions/checkout@v2
with:
repository: mikesay/mikesay.github.io
token: ${{ secrets.GIT_TOKEN }}
path: mikesay
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: Install Dependencies and setup
run: ./setup.sh
- name: Generate blog site
run: npm run build
- name: Generate adhoc files
run: |
touch public/.nojekyll
echo www.mikesay.com > public/CNAME
rsync -av --delete ./ebooks ./public/
- name: Sync latest site
run: rsync -av --delete --exclude '.git*' ./public/ ./mikesay/
- name: Push latest site
uses: EndBug/add-and-commit@v7
with:
author_name: mikejianzhang
author_email: [email protected]
message: 'Deploy site'
add: '.'
push: true
cwd: './mikesay'