Build and test #10814
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: Build and test | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 0/2 * * *' | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
git fetch --all | |
- name: Generate repository | |
run: php build.php | |
- name: Deploy to github pages | |
run: | | |
git config user.email "${{ secrets.BOT_EMAIL }}" | |
git config user.name "Github Action" | |
git add -A | |
git stash | |
git checkout gh-pages | |
git checkout stash -- composer | |
if [[ -n $(git status -s) ]] | |
then | |
git commit -m "Update packages" | |
git push https://${{ secrets.BOT_USER }}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git | |
else | |
echo "No changes in the repository" | |
fi |