Skip to content

OpenJij Top Page

OpenJij Top Page #565

name: OpenJij Top Page
on:
workflow_dispatch:
release:
types: [published]
schedule:
- cron: '00 20 * * 1'
- cron: '30 22 * * 2'
- cron: '00 00 * * 3'
- cron: '30 02 * * 4'
- cron: '00 04 * * 5'
- cron: '30 06 * * 6'
- cron: '00 08 * * 0'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: WWW
cancel-in-progress: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Prepare tag
id: prepare_tag
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG_NAME="${GITHUB_REF##refs/tags/}"
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "deploy_tag_name=deploy-${TAG_NAME}" >> $GITHUB_OUTPUT
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: ${{ github.ref == 'refs/heads/main' }}
with:
personal_token: ${{ secrets.OPENJIJ_WEB }}
keep_files: true
allow_empty_commit: true
publish_dir: ./www
publish_branch: main
external_repository: OpenJij/OpenJij-Top-Page
destination_dir: www
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: ${{ github.event.head_commit.message }}
full_commit_message: ${{ github.event.head_commit.message }}
tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
#cname: www.openjij.org