Github Pages #1527
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: Github Pages | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 6 * * *' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- name: Checkout PrestaShop repository | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/PrestaShop | |
fetch-depth: 1 | |
path: prestashop | |
- name: Checkout PrestaShop repository (9.0.x) | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/PrestaShop | |
fetch-depth: 1 | |
path: prestashop_90x | |
ref: 9.0.x | |
- name: Checkout PrestaShop repository (8.2.x) | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/PrestaShop | |
fetch-depth: 1 | |
path: prestashop_82x | |
ref: 8.2.x | |
- name: Checkout PrestaShop repository (8.1.x) | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/PrestaShop | |
fetch-depth: 1 | |
path: prestashop_81x | |
ref: 8.1.x | |
- name: Checkout PrestaShop repository (8.0.x) | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/PrestaShop | |
fetch-depth: 1 | |
path: prestashop_80x | |
ref: 8.0.x | |
- name: Checkout PrestaShop repository (1.7.8.x) | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/PrestaShop | |
fetch-depth: 1 | |
path: prestashop_178x | |
ref: 1.7.8.x | |
- name: Checkout Module repository (autoupgrade) | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/autoupgrade | |
fetch-depth: 1 | |
path: autoupgrade | |
ref: dev | |
- name: Checkout Module repository (blockwishlist) | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/blockwishlist | |
fetch-depth: 1 | |
path: blockwishlist | |
ref: dev | |
- name: Checkout Module repository (ps_cashondelivery) | |
uses: actions/checkout@v4 | |
with: | |
repository: PrestaShop/ps_cashondelivery | |
fetch-depth: 1 | |
path: ps_cashondelivery | |
ref: dev | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.121.1' | |
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 | |
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: Clean `known-bugs` directory | |
run: rm -rf src/content/scenarios/known-bugs/ | |
- name: Export Known bugs | |
run: php scripts/bin/console scenario:export:knownbugs --config config.json | |
- name: Remove prestashop directory (on Develop) | |
run: rm -rf ./prestashop/ | |
- name: Remove prestashop directory (on 9.0.x) | |
run: rm -rf ./prestashop_90x/ | |
- name: Remove prestashop directory (on 8.2.x) | |
run: rm -rf ./prestashop_82x/ | |
- name: Remove prestashop directory (on 8.1.x) | |
run: rm -rf ./prestashop_81x/ | |
- name: Remove prestashop directory (on 8.0.x) | |
run: rm -rf ./prestashop_80x/ | |
- name: Remove prestashop directory (on 1.7.8.x) | |
run: rm -rf ./prestashop_178x/ | |
- name: Remove module directory (autoupgrade) | |
run: rm -rf ./autoupgrade/ | |
- name: Remove module directory (blockwishlist) | |
run: rm -rf ./blockwishlist/ | |
- name: Remove module directory (ps_cashondelivery) | |
run: rm -rf ./ps_cashondelivery/ | |
- 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 |