Skip to content

Repo Sync

Repo Sync #1307

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Repo Sync
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
schedule:
- cron: "0 2 * * 0-6"
push:
branches:
- master
jobs:
# This workflow contains a single job called "build"
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: repo
- name: Save Key
run: |
mkdir private
echo "$SYNC_KEY" > private/id_rsa
shell: bash
env:
SYNC_KEY: ${{secrets.SYNC_KEY}}
- name: Generate dyn generated files
run: node protected/page-build-prerun.js
working-directory: repo
- name: Do Sync
run: "sh repo/.script/sync/dosync.sh"
env:
MIRAI_REPO_SERVER: ${{secrets.MIRAI_REPO_SERVER}}
MIRAI_REPO_PATH: ${{secrets.MIRAI_REPO_PATH}}
MIRAI_FORUM_SERVER: ${{secrets.MIRAI_FORUM_SERVER}}
MIRAI_FORUM_PATH: ${{secrets.MIRAI_FORUM_PATH}}