Skip to content

Github Pages

Github Pages #1017

Workflow file for this run

name: Github Pages
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 6 * * *'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.85.0'
extended: true
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Clean public directory
run: rm -rf public
- name: Composer install
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule' }}
run: cd scripts && composer install && cd ..
- name: Export JIRA XRay Core
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule' }}
run: php scripts/bin/console scenario:export:core --apikey ${{ secrets.JIRA_APIKEY }}
- name: Export JIRA XRay Modules
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule' }}
run: php scripts/bin/console scenario:export:module --apikey ${{ secrets.JIRA_APIKEY }}
- name: Commit changes
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[Update] JIRA XRay Tests"
- name: Build
run: cd src && hugo && cd ..
- name: Deploy
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./src/public