Skip to content

Build and test

Build and test #10814

Workflow file for this run

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