Public page CI #1
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: Public page CI | |
| on: | |
| push: | |
| branches: [ public_page ] | |
| #pull_request: | |
| # branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-gh-pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| #- uses: actions/checkout@master | |
| - name: Checkout Repository backup branch | |
| uses: actions/checkout@master | |
| - name: Setup Node.js lts | |
| uses: actions/setup-node@master | |
| with: | |
| node-version: "22.x" | |
| # - name: Setup pandoc.deb lts # 插件 hexo-renderer-pandoc 依赖于此软件 | |
| # run: | | |
| # wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb | |
| # sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb | |
| # - name: Setup Hexo Dependencies | |
| # env: | |
| # HEXO_DEPLOY_PRIVATE_KEY: ${{ secrets.HEXO_DEPLOY_PRIVATE_KEY }} | |
| # run: | | |
| # mkdir -p ~/.ssh/ | |
| # echo "$HEXO_DEPLOY_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa | |
| # chmod 600 ~/.ssh/id_rsa | |
| # ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| # git config --global user.name 'simon7073' | |
| # git config --global user.email 'simoncq@163.com' | |
| # npm install hexo -g | |
| # npm install | |
| - name: server Hexo | |
| run: | | |
| hexo server |