Skip to content

Update sources

Update sources #7359

Workflow file for this run

name: Update sources
# Run on push and 4 times per day
on:
schedule:
- cron: 0 0,6,12,18 * * *
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
container: universalteam/db
steps:
- uses: actions/checkout@v1
- name: Delete old pages and QRs
run: rm -rf docs/_3ds/* docs/_ds/* docs/assets/images/qr/*.png docs/assets/images/qr/nightly/*.png docs/assets/images/qr/prerelease/*.png
- name: Run generate.py
run: |
export PATH=$PATH:/opt/devkitpro/tools/bin
python3 source/generate.py source/apps docs --token ${{ secrets.GITHUB_TOKEN }}
- name: Pull origin
run: git pull origin master --ff-only # Pull origin in case a commit has been done while updating
- name: Push changes
run: |
git config user.email "[email protected]"
git config user.name "TWLBot"
echo "machine github.com" > "$HOME/.netrc"
echo " login TWLBot" >> "$HOME/.netrc"
echo " password ${{ secrets.GITHUB_TOKEN }}" >> "$HOME/.netrc"
echo "machine api.github.com" >> "$HOME/.netrc"
echo " login TWLBot" >> "$HOME/.netrc"
echo " password ${{ secrets.GITHUB_TOKEN }}" >> "$HOME/.netrc"
git checkout master
git stage .
if git commit -m "Update sources"; then
git push origin master
fi