Skip to content

Fix compile

Fix compile #2567

name: Website Deploy
on:
push:
branches:
- master
jobs:
deploy_main:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy To Main
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Setup Docsy
run: git submodule update --init --recursive && sudo npm install -D --save autoprefixer && sudo npm install -D --save postcss-cli
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.134.2'
extended: true
- name: Build
env:
HUGO_ENV: production
run: hugo mod clean && hugo --minify
- name: Copy other files
run: cp .htaccess ./public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: asf-site-v2
publish_dir: ./public
keep_files: true
deploy_cn:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy To CN
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Setup Docsy
run: git submodule update --init --recursive && sudo npm install -D --save autoprefixer && sudo npm install -D --save postcss-cli
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.134.2'
extended: true
- name: Build
env:
HUGO_ENV: production
run: hugo mod clean && hugo --minify --config cn_config.toml
- name: Copy other files
run: cp .htaccess ./public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: cn-site
publish_dir: ./public
keep_files: true
- name: Build Benchmark
run: sh ./build_bh.sh
- name: Deploy Benchmark
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: cn-site
publish_dir: ./static
keep_files: true