New post #131
This file contains 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
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | |
name: Deploy to github pages | |
on: | |
push: | |
branches: [ "develop" ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Use Node.js 13 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 13.x | |
- run: npm install | |
- run: npm audit fix | |
- run: cd themes/obsidian && npm install | |
- run: npm install hexo-cli -g | |
- run: hexo clean | |
- run: hexo g | |
- run: | | |
cd ./public | |
git init | |
git config user.name "Alpha Hinex" | |
git config user.email "AlphaHinex@gmail.com" | |
git add . | |
git commit -m "Update docs" | |
git push --force "https://AlphaHinex:${{ secrets.GITHUB_TOKEN }}@github.com/AlphaHinex/AlphaHinex.github.io" master:master |