Bump hexo from 8.0.0 to 8.1.0 #460
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: ๐ธโจ Hexo to gh-pages UwU โจ๐ธ | |
| on: | |
| push: | |
| branches: | |
| - main # ๐ main branch uwu | |
| workflow_dispatch: # ๐ฑ๏ธ manual trigger nyan~ | |
| schedule: | |
| - cron: '0 0 * * *' # โฐ๐ Nightly buildies ~nyan! ๐พ (โฟโ โฟโ ) | |
| jobs: | |
| build: | |
| name: ๐๏ธ Build UwU | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest # ๐ง๐ | |
| steps: | |
| - name: ๐ฆ๐ Checkout Code OwO | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.FINE_GRAINED_PAT }} | |
| submodules: recursive | |
| - name: ๐จ๐ฟ Check for Theme Updates nya~ | |
| run: | | |
| git submodule update --init --recursive | |
| cd themes/cactus | |
| DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5) | |
| git fetch origin $DEFAULT_BRANCH | |
| git reset --hard origin/$DEFAULT_BRANCH | |
| cd ../.. | |
| if [ -n "$(git status -s)" ]; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add themes/cactus | |
| # โจ Random kawaii commit messages โจ | |
| MESSAGES=( | |
| "๐ธโจ Updated theme to latest nya~ (โงฯโฆ)๐" | |
| "๐ UwU Theme update desu! โจ nyaaa~ (โฟโ โฟโ )๐" | |
| "๐พ๐ก Theme go brrr~ updated to freshy fresh โจ owo (๏ฝก>๏น<๏ฝก)๐" | |
| "๐โจ Theme update complete UwU ~nya nya (โงโกโฆ)โง" | |
| "๐๐ธ Senpai~ I updated the theme for you (โฟโฅโฟโฅ) โจ" | |
| ) | |
| RANDOM_MSG=${MESSAGES[$RANDOM % ${#MESSAGES[@]}]} | |
| git commit -am "$RANDOM_MSG" | |
| git remote set-url origin https://${{ secrets.FINE_GRAINED_PAT }}@github.com/BrokenBotnet/brokenbotnet.github.io.git | |
| git push | |
| fi | |
| continue-on-error: true | |
| - name: ๐๐ Use Node.js latest uwu | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "latest" | |
| - name: ๐พ๐พ Cache NPM dependencies OwO | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.OS }}-npm-cache | |
| restore-keys: | | |
| ${{ runner.OS }}-npm-cache | |
| - name: ๐พ Cache Hexo build files โจ | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .deploy_git | |
| .hexo | |
| key: ${{ runner.os }}-hexo-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-hexo- | |
| - name: ๐ฅ๐ฌ Install Dependencies uwuwu | |
| run: npm install | |
| - name: โจ๐ Run ESLint OwO | |
| run: | | |
| npx eslint . || echo "(๏ฝกโขฬ๏ธฟโขฬ๏ฝก) linty errors... but I wonโt stop you senpai~" | |
| - name: ๐๏ธ๐ Build Site nya~ | |
| run: npm run build | |
| - name: โ ๐ฎ Add custom Nostr NIP-05 verification UwU | |
| run: | | |
| mkdir -p ./public/.well-known | |
| echo '{ | |
| "names": { | |
| "r3bo0tbx1": "1c6234b2c80549b609be27522cbe2b73400859b24a913855d48503d5d819060d" | |
| } | |
| }' > ./public/.well-known/nostr.json | |
| - name: ๐ก๏ธ๐ Ensure .nojekyll and CNAME (so safee~ >w<) | |
| run: | | |
| echo "" > ./public/.nojekyll | |
| echo "brokenbotnet.com" > ./public/CNAME | |
| - name: ๐ธ Upload preview artifact uwu | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: site-preview | |
| path: ./public | |
| - name: ๐ค๐ Upload Pages artifact OwO | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./public | |
| retention-days: 1 | |
| deploy: | |
| name: ๐ Deploy to Pages โจ | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest # ๐งโจ | |
| steps: | |
| - name: ๐๐ธ Deploy to GitHub Pages uwu | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| notify: | |
| name: ๐ Send Notifs nya~ | |
| needs: build | |
| permissions: {} | |
| runs-on: ubuntu-latest # ๐ง๐ | |
| if: always() | |
| steps: | |
| - name: โ ๐ Send Matrix Notification on Success nya~ โจ | |
| if: success() | |
| run: | | |
| curl -X POST -d '{ | |
| "msgtype": "m.text", | |
| "body": "๐ธ๐ Yaaay~ Deployment Succeeded! (โฟโ โฟโ ) ๐โจ\n\nYour GitHub Pages site is fresh & shiny now uwu ๐" | |
| }' \ | |
| "${{ secrets.MATRIX_SERVER_URL }}/_matrix/client/r0/rooms/${{ secrets.MATRIX_ROOM_ID }}/send/m.room.message?access_token=${{ secrets.MATRIX_ACCESS_TOKEN }}" | |
| - name: โ๐ฟ Send Matrix Notification on Failure (oh noes~) ๐ | |
| if: failure() | |
| run: | | |
| curl -X POST -d '{ | |
| "msgtype": "m.text", | |
| "body": "โ๐ฅ Oopsies~ Deployment Failed! (๏ฝกโขฬ๏ธฟโขฬ๏ฝก)\n\nโ ๏ธ Please check the GitHub Actions logs for details nya~ ๐ฅบ" | |
| }' \ | |
| "${{ secrets.MATRIX_SERVER_URL }}/_matrix/client/r0/rooms/${{ secrets.MATRIX_ROOM_ID }}/send/m.room.message?access_token=${{ secrets.MATRIX_ACCESS_TOKEN }}" |