Skip to content

Update deploy.yml

Update deploy.yml #14

Workflow file for this run

name: Deploy Website
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true # Add this line if you use submodules
- name: Set up Node.js 20
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7 # Adjust the version to match your project's Ruby version
- name: Install Bundler
run: gem install bundler
- 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