chore(deps-dev): bump webpack from 5.93.0 to 5.94.0 #76
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: Deploy Demo Page | |
defaults: | |
run: | |
shell: bash | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }} | |
- name: Prepare hexo demo source | |
run: | | |
mkdir demo | |
cd demo | |
git clone -b gh-source https://github.com/fi3ework/hexo-theme-archer.git . | |
npm install | |
- name: Move latest theme source files to hexo demo folder | |
run: | | |
cd demo | |
mkdir -p themes/archer | |
find .. -maxdepth 1 ! -path '..' ! -path '../demo' ! -path '../.git' -exec mv -t ./themes/archer/ {} + | |
- name: Build latest theme | |
run: | | |
cd demo/themes/archer | |
npm install | |
npm run build | |
- name: Generate static files | |
run: | | |
npm install -g hexo-cli | |
cd demo | |
hexo g | |
ls -lh public | |
- name: Publish | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./demo/public | |
force_orphan: true |