Update deploy.yml #16
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 Website | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up Node.js 20 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Install Bundler | |
run: gem install bundler -v 2.4.22 | |
- name: Build and deploy | |
run: | | |
# Fetch latest changes from the main branch | |
git fetch origin main | |
# Reset the local main branch to match the fetched changes | |
git reset --hard origin/main | |
# Run any build commands if necessary | |
bundle install | |
bundle exec jekyll build | |
# npm & Hugo extension : | |
npm install | |
npm run build | |
hugo --minify |