sync-unstable #6
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: sync-unstable | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'branch to sync to (no -unstable suffix)' | |
required: true | |
jobs: | |
sync: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout unstable branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch }}-unstable | |
fetch-depth: 0 | |
- name: Strip -unstable suffix | |
run: | | |
find . -type f -exec sed -i 's/-unstable//g' {} + | |
- name: Add sync date to README | |
run: | | |
sed -i "/ Date/ a | Synced As Stable | $(date) |" README.md | |
- name: Move to public | |
run: | | |
mkdir public | |
mv -f * public || true | |
- name: Deploy | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: ${{ github.event.inputs.branch }} | |
FOLDER: public | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SQUASH_HISTORY: true | |
MESSAGE: "Sync from unstable branch" |