fix: enable workflow #2
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 Website | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Set up Node.js environment | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
npm install | |
npm install -g hexo-cli | |
npm install hexo-theme-stellar | |
npm audit fix | |
# Generate static files | |
- name: Generate static files | |
run: hexo generate | |
# Deploy to GitHub Pages | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |