-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (50 loc) · 1.89 KB
/
gh-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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