Skip to content

#17会計報告

#17会計報告 #634

Workflow file for this run

name: Netlify
on:
pull_request:
types: [opened, synchronize]
env:
JEKYLL_VERSION: 3.8
JEKYLL_ENV: production
TZ: Asia/Tokyo
permissions:
pull-requests: write
deployments: write
statuses: write
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
submodules: "true"
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.2"
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
gem install bundler:2.5.4
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- run: ./scripts/apply_git_log_as_lastmodified_date.sh
- name: Update config for Netlify
run: |
sed -i -e 's#url: "https://tofuconf.club"#url: ""#' _config.yml # https://github.com/tofuconf/tofuconf.club/pull/122
sed -i -e 's#tracking_id: ".*"#tracking_id: ""#' _config.yml
- name: Build HTML
run: |
bundle exec jekyll build --config _config.yml
- name: Approve PR if the build is successful
env:
GH_TOKEN: ${{ secrets.TOFUCONF_BOT_PAT }}
run: |
gh pr review ${{ github.event.number }} --approve
gh pr edit ${{ github.event.number }} --remove-reviewer login
- name: Verify URL in HTML
run: |
bundle exec htmlproofer --enforce_https false --ignore-status-codes "400,999" --ignore-urls "/#.*/,/tofuconf.club/.*/,/twitter.com/,/t.co/,/www.facebook.com/sharer/sharer.php.*/,/www.kyash.co/" ./_site
- name: Deploy to Netlify
if: ${{ always() }}
uses: nwtgck/[email protected]
with:
publish-dir: "./_site"
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}