docs(readme): add yandex.metrics badge (#45) #60
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: Push to Deploy | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "7 10 1 * *" # at 10:07 on the first day of every month (i.e. monthly) | |
workflow_dispatch: | |
concurrency: ${{ github.workflow }} | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yaml | |
with: | |
artifact-name: docs | |
push-to-deploy: | |
needs: build | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: deploy | |
- name: Configure github-actions git user | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: Clean current deployment | |
run: git rm -rf docs | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ needs.build.outputs.artifact-name }} | |
path: docs | |
- name: Re-add and commit the main folder | |
id: commit | |
continue-on-error: true # may fail if there's nothing to commit | |
run: | | |
git add docs | |
git commit -m "update ${{ needs.build.outputs.commit }}" | |
- name: Push to deploy branch | |
if: steps.commit.outcome == 'success' | |
run: | | |
git push origin |