Upload docs with Github Actions #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: Upload Docs iOS | |
on: | |
pull_request: | |
types: | |
- opened | |
branches: | |
- 'master' | |
jobs: | |
upload-docs: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Commit TXT file to docs branch | |
run: | | |
git config user.name "github-actions" | |
git config user.email "github-actions@github.com" | |
git fetch origin docs || git checkout -b docs | |
echo "This is a generated file." > generated_file.txt | |
git add generated_file.txt | |
git commit -m "Add generated TXT file" | |
git push origin docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |