-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.64 KB
/
production-home.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
name: Home-Production
on:
repository_dispatch:
types: [production-complete]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout theme repo
uses: actions/checkout@main
with:
repository: Aspose/products.aspose.com
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.110.0'
extended: true
- name: Install autoprefixer
run: npm install -D --save autoprefixer
- name: Install postcss-cli
run: npm install -D --save postcss-cli
- name: Find and replace url param in frontmatter
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "url:"
replace: "url_ignore:"
include: "_index.md"
- name: Find and replace image url domain
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "logoImageSrc=\"https://www.aspose.cloud/"
replace: "logoImageSrc=\"https://cms.admin.containerize.com/"
include: "_index.md"
- name: Build Home
run: hugo --config "configs/home.toml" -c "content" -b "https://products.aspose.com/" --cleanDestinationDir --minify --disableKinds 404
- name: Prepare public folder
run: mv /home/runner/work/products.aspose.com-workflows/products.aspose.com-workflows/home-ru.sitemap public/ru-sitemaps.xml;
- name: Deploy Home to S3
run: hugo deploy --config "configs/home.toml" --maxDeletes=0 --target "production" --force
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}