Build and deploy Jekyll H2ade Blog #1675
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: Build and deploy Jekyll H2ade Blog | |
on: | |
push: | |
branches: | |
- 'main' | |
# - 'releases/**' | |
# - '!releases/**-alpha' | |
# tags: | |
# - v1.*.* | |
schedule: | |
- cron: "0 2 * * *" | |
paths-ignore: | |
- .gitignore | |
- README.md | |
- LICENSE.txt | |
- _drafts/ | |
env: | |
LANG: "fr_FR.UTF-8" | |
jobs: | |
github-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Time/zone | |
uses: szenius/set-timezone@v1.2 | |
with: | |
timezoneLinux: "Europe/Paris" | |
- name: fr_FR.UTF-8 | |
run: | | |
sudo locale-gen fr_FR.UTF-8 | |
sudo update-locale LANG=fr_FR.UTF-8 | |
- name: date | |
run: | | |
date | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install and Build | |
run: | | |
sudo apt-get update | |
sudo apt-get install libvips libvips-dev libvips-tools libvips-tools gvfs poppler-utils ghostscript -y | |
locale | |
node -v | |
npm -v | |
npm install | |
npm run scrap | |
echo aliexpress-domadoo scraper OK | |
npm run build:js | |
echo uglify js OK | |
vips -v | |
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc | |
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc | |
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc | |
source ~/.bashrc | |
sudo gem install jekyll bundler | |
bundle config set --local path 'vendor/bundle' | |
bundle install && bundle update | |
bundle exec jekyll clean | |
JEKYLL_ENV=production bundle exec jekyll build | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4.4.3 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: _site # The folder the action should deploy. | |
token: ${{ secrets.GITHUB_TOKEN }} |