gh-pages deploy #1392
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: gh-pages deploy | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 18 * * *' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22.17.1 | |
- name: Install node dependencies | |
run: | | |
npm install -g yarn | |
yarn install | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libffi-dev build-essential | |
- name: Set up Ruby 3.4 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.4.5 | |
bundler-cache: true | |
- name: Verify bundler installation and install dependencies | |
run: | | |
bundler --version | |
gem install rake | |
bundle check || bundle install --jobs 4 --retry 3 | |
- name: Initialize & update hub submodule | |
run: | | |
git submodule deinit -f . && git submodule update --init --recursive | |
git submodule update --remote | |
./_devel/update_hub_submodule.sh | |
- name: Build Jekyll site | |
env: | |
JEKYLL_GITHUB_TOKEN: ${{ secrets.JEKYLL_GITHUB_TOKEN }} | |
run: | | |
make build_deploy | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |