発表タイトルを更新 (#493) #261
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: Deploy | |
on: | |
push: | |
branches: | |
- master | |
env: | |
JEKYLL_VERSION: 3.8 | |
JEKYLL_ENV: production | |
TZ: Asia/Tokyo | |
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: Build HTML | |
run: | | |
bundle exec jekyll build --config _config.yml | |
- name: Verify URL in HTML | |
continue-on-error: true | |
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: Prepare SSH 1 | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Prepare SSH 2 | |
run: | | |
mkdir -p ~/.ssh && touch ~/.ssh/config | |
echo -e "Host tofuconf.club\n\tIdentityFile ~/.ssh/id_rsa\n\tPort 22001\n" >> ~/.ssh/config | |
ssh-keyscan -H tofuconf.club >> ~/.ssh/known_hosts | |
- name: Start deployment | |
uses: bobheadxi/[email protected] | |
id: deployment | |
with: | |
step: start | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: release | |
- name: Deploy | |
run: | | |
bash ./scripts/deploy.sh | |
- name: Update deployment status | |
uses: bobheadxi/[email protected] | |
if: always() | |
with: | |
step: finish | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: ${{ job.status }} | |
env: ${{ steps.deployment.outputs.env }} | |
deployment_id: ${{ steps.deployment.outputs.deployment_id }} | |
env_url: https://tofuconf.club |