Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
planet98 authored Jan 18, 2025
1 parent 768bf65 commit 2ea8025
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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

0 comments on commit 2ea8025

Please sign in to comment.