deploy: cleanlab/cleanlab@fcb653811c1ddd4afd960ba2710e443cf6edb384 #627
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: Update Stable Directory | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-20.04 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Configure git | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "GitHub Actions" | |
- name: Get the latest stable version number | |
id: get-latest-version | |
run: echo "::set-output name=version::$(cat latest_release.txt)" | |
- name: Delete current "stable" directory | |
run: | | |
git rm -r stable | |
- name: Copy latest stable version content to "stable" directory | |
run: | | |
mkdir stable | |
cp -a ${{ steps.get-latest-version.outputs.version }}/* stable | |
- name: Commit and push | |
run: | | |
git add -A | |
git diff-index --quiet HEAD || ( git commit -m "Update stable dir" && git push ) |