Skip to content

Add

Add #127

Workflow file for this run

name: "Prod"
on:
push:
branches:
- main
- master
paths-ignore:
- .gitignore
- README.md
- LICENSE
workflow_dispatch:
permissions:
contents: write
id-token: write
concurrency:
group: "prod"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3
bundler-cache: true
- name: Build site
run: bundle exec jekyll b --verbose --config=_config.yml,_config.prod.yml -d "_site${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: "production"
# - name: Test site
# run: |
# bundle exec htmlproofer _site \
# \-\-disable-external=true \
# \-\-enforce_https=false \
# \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
- name: Deploy to prod branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: "_site${{ steps.pages.outputs.base_path }}"
publish_branch: prod
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'