update: 我的家庭 NAS 方案(当前进化至 EPYC 7D12 + TrueNAS) #48
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: Deploy | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: 'v22.12.0' | |
| - name: Setup Hexo | |
| run: | | |
| npm install hexo-cli -g | |
| npm install | |
| - name: Deploy to COS | |
| env: | |
| COS_SECRET_ID: ${{ secrets.COS_SECRET_ID }} | |
| COS_SECRET_KEY: ${{ secrets.COS_SECRET_KEY }} | |
| COS_BUCKET: ${{ secrets.COS_BUCKET }} | |
| COS_REGION: ${{ secrets.COS_REGION }} | |
| run: | | |
| hexo clean && hexo g && hexo d | |
| - name: Deploy to Github Pages | |
| env: | |
| GH_REF: github.com/myloft/blog | |
| CI_TOKEN: ${{ secrets.CI_TOKEN }} | |
| run: | | |
| git clone https://${GH_REF} .deploy_git | |
| cd .deploy_git | |
| git checkout master | |
| cd ../ | |
| mv .deploy_git/.git/ ./public/ | |
| cd ./public | |
| git init | |
| git config user.name "Yu" | |
| git config user.email "admin@iloft.xyz" | |
| git add . | |
| git commit -m ":memo: Update blog by Actions" | |
| git push --force --quiet "https://${CI_TOKEN}@${GH_REF}" master:gh-pages |