Update Public Content #2
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 Public Content | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'docs/**' | |
- 'i18n/**' | |
workflow_dispatch: | |
jobs: | |
update-public-content: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout private repository | |
uses: actions/checkout@v4 | |
- name: Configure Git | |
run: | | |
git config --global user.name 'GitHub Actions Bot' | |
git config --global user.email 'actions@github.com' | |
- name: Update public repository | |
env: | |
ADMIN: ${{ secrets.ADMIN}} | |
run: | | |
git clone --depth 1 --branch main https://${{ secrets.ADMIN}}@github.com/Consensys/docs-mm-helpcenter.git public-repo | |
rm -rf public-repo/* | |
cp -r docs i18n public-repo/ | |
cd public-repo | |
git add . | |
git commit -m "Update content from site backend" | |
git push |