每日新闻 #88
This file contains hidden or 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: Build Pages | |
on: | |
push: | |
branches: [ source ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install | |
run: | | |
sudo apt-get update | |
sudo apt-get install nasm -y | |
npm install -g hexo-cli | |
npm install | |
npm install hexo-all-minifier --save | |
- name: Build | |
run: | | |
hexo clean | |
git clone https://oauth2:${{ secrets.GITHUB_TOKEN }}@github.com/APC-ScienceUnion/APC-ScienceUnion.github.io.git public -b main --depth=1 | |
cd public | |
git rm -rf . | |
cd .. | |
hexo g | |
cp -r ./404 ./public | |
- name: Deploy | |
run: | | |
cd public | |
git config --global user.email "[email protected]" | |
git config --global user.name "Auto Deploy Bot" | |
git add . | |
git commit -m "Automatic Deploy" | |
git push -f | |