Redeploy Back4 #1
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: Redeploy Back4 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '* * */10 * *' | |
jobs: | |
Redeploy: | |
name: Redeploy Back4 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 1 | |
- name: Renew README.md | |
run: | | |
DATE=$(date "+%Y/%m/%d %H:%M:%S") | |
echo "${DATE}" > README.md | |
git checkout --orphan tmp_work | |
git branch -d main | |
echo "DATE=${DATE}" >> $GITHUB_ENV | |
- name: Upload to repository | |
uses: stefanzweifel/[email protected] | |
with: | |
commit_message: Auto deploy by Github Actions, ${{ env.DATE }} | |
create_branch: true | |
branch: main | |
push_options: --force | |
- name: Delete old workflow runs | |
uses: MajorScruffy/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
repository: ${{ github.repository }} | |
older-than-seconds: 3600 |