update #132
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
name: Deploy Project | |
on: | |
push: | |
branches: master | |
jobs: | |
gh-release: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.85.0' | |
- name: Install and Build | |
run: | | |
git config --global user.name "Azderica" | |
git config --global user.email mh97888@gmail.com | |
# npm ci | |
npm install | |
npm run build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
user_email: 'mh97888@gmail.com' | |
user_name: 'Azderica' | |
github_token: ${{ secrets.ACCESS_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./dist # The folder the action should deploy. | |
cname: github.com | |
allow_empty_commit: true |