Deploy #56
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
# Deploy to Docker Hub | |
# See <https://hub.docker.com/repository/docker/jvconseil/jekyll-docker/general> | |
# Copyright (c) 2019-2023 JV-conseil, All rights reserved | |
name: "Deploy" | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
# “At 04:00 on day-of-month 1.” See <https://crontab.guru/#0_4_1_*_*> | |
# * is a special character in YAML so you have to quote this string | |
- cron: "0 4 1 * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 360 | |
name: "Deploy" | |
strategy: | |
fail-fast: false | |
matrix: | |
env: | |
# - | |
# - jekyll:4.3.3 | |
# - jekyll:stable | |
# - jekyll:latest | |
# - jekyll:4.0 | |
# - jekyll:4 | |
- - jekyll-docker:4.3.3 | |
- jekyll-docker:stable | |
- jekyll-docker:latest | |
- jekyll-docker:4.0 | |
- jekyll-docker:4 | |
# - | |
# - jekyll-minimal:4.3.3 | |
# - jekyll-minimal:stable | |
# - jekyll-minimal:latest | |
# - jekyll-minimal:4.0 | |
# - jekyll-minimal:4 | |
# - jekyll-docker:pages | |
# - jekyll-minimal:pages | |
# - jekyll:pages | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Setup Ruby" | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- run: bundle install | |
- name: "Docker Experimental" | |
run: | | |
echo $'{\n "experimental": true\n}' | \ | |
sudo tee /etc/docker/daemon.json | |
sudo systemctl restart docker | |
- name: "Login to Docker Hub" | |
# uses: docker/login-action@v2 | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash | |
env: | |
RUBYOPT: "-W0" | |
DOCKER_REPO: "${{ join(matrix.env, ' ') }}" | |
- run: bundle exec docker-template push $DOCKER_REPO | |
env: | |
RUBYOPT: "-W0" | |
DOCKER_REPO: "${{ join(matrix.env, ' ') }}" |