Build and Deploy #5752
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
# see https://github.com/marketplace/actions/deploy-to-github-pages | |
name: Build and Deploy | |
on: | |
workflow_dispatch: ~ | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 */6 * * 1-5' | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
name: Validate code | |
env: | |
PHP_CS_FIXER_IGNORE_ENV: true | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: none | |
extensions: gd, imagick | |
- run: composer install --no-progress | |
- name: Grumphp | |
run: vendor/bin/grumphp run --ansi | |
- name: PHPInsights | |
run: vendor/bin/phpinsights -n --ansi | |
deploy: | |
needs: check | |
runs-on: ubuntu-latest | |
name: Deploy static website | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: none | |
extensions: gd, imagick | |
- run: composer install --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --no-suggest | |
- name: Build π¦ | |
run: bin/console dump-static-site --ansi | |
env: | |
GITHUB_USERNAME: ${{ secrets.ACCESS_TOKEN }} | |
AFUP_USERNAME: ${{ secrets.AFUP_USERNAME }} | |
AFUP_PWD: ${{ secrets.AFUP_PWD }} | |
UNSPLASH_ACCESS_KEY: ${{ secrets.UNSPLASH_ACCESS_KEY }} | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPOSITORY_NAME: Jibbarth/jibbarth.github.io | |
BRANCH: master | |
FOLDER: output | |
update-readme: | |
needs: check | |
runs-on: ubuntu-latest | |
name: Update Github Profile Readme | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: none | |
extensions: gd, imagick | |
- run: composer install --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --no-suggest | |
- name: Build π¦ | |
run: bin/console generate-readme --ansi | |
env: | |
GITHUB_USERNAME: ${{ secrets.ACCESS_TOKEN }} | |
UNSPLASH_ACCESS_KEY: ${{ secrets.UNSPLASH_ACCESS_KEY }} | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPOSITORY_NAME: Jibbarth/Jibbarth | |
BRANCH: master | |
FOLDER: output |