-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (71 loc) · 2.42 KB
/
apireference-aspose-cells-split-stage.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: apireference2.aspose.com(cells)(Stage)
on:
push:
branches: [ main ]
paths:
- 'content/sites/aspose/cells/**'
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
configure_one_product:
- cpp
- go-cpp
- java
- net
- nodejs-cpp
steps:
- name: Checkout main repository
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Checkout theme repository
uses: actions/checkout@v2
with:
repository: Aspose/api-theme
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
ref: imaging
path: themes/api-theme
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.119.0'
extended: true
- name: Install Dependencies
run: |
npm install -D --save autoprefixer
npm install -D --save postcss-cli
- name: Configure build environment
env:
CONFIGURE_ONE_PRODUCT: ${{ matrix.configure_one_product }}
CONFIGURE_FAMILY: 'cells'
run: npm run configure
- name: Display config.json
run: cat ${{ github.workspace }}/config.json
- name: Build
run: hugo --configDir config/sites/aspose/cells --config "config.json" --environment staging --minify --cleanDestinationDir
- name: Prepare the public folder
run: |
find ${{ github.workspace }}/public -iname 'sitemap.xml' -execdir mv -i '{}' ${{ matrix.configure_one_product }}.xml \;
mv ${{ github.workspace }}/total.cells.sitemap public/sitemap.xml
- name: Deploy to S3
run: hugo --configDir config/sites/aspose/cells --environment staging deploy --target "Stage" --maxDeletes=0 --force
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
- name: Invalidate CloudFront cache
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }}
PATHS: /cells/${{ matrix.configure_one_product }}/*
AWS_REGION: 'us-west-2'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}