Skip to content

Commit e214c64

Browse files
Add tasks workflow
1 parent e0f313e commit e214c64

File tree

5 files changed

+305
-0
lines changed

5 files changed

+305
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: tutorials.aspose.cloud(tutorials-tasks)(family)(Production)
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master ]
10+
paths:
11+
- 'content/tasks/**'
12+
pull_request:
13+
branches: [ master ]
14+
paths:
15+
- 'content/tasks/**'
16+
17+
# Allows you to run this workflow manually from the Actions tab
18+
workflow_dispatch:
19+
20+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
21+
jobs:
22+
# This workflow contains a single job called "build"
23+
build:
24+
# The type of runner that the job will run on
25+
runs-on: ubuntu-latest
26+
27+
# Steps represent a sequence of signature that will be executed as part of the job
28+
steps:
29+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
with:
33+
submodules: true # Fetch Hugo themes
34+
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
35+
- name: Checkout theme repo
36+
uses: actions/checkout@main
37+
with:
38+
repository: aspose-cloud/tutorials-theme
39+
token: ${{ secrets.REPO_TOKEN }}
40+
fetch-depth: 0
41+
path: themes/tutorials-theme
42+
# Step 2 - Sets up the latest version of Hugo
43+
- name: Setup Hugo
44+
uses: peaceiris/actions-hugo@v2
45+
with:
46+
hugo-version: '0.135.0'
47+
extended: true
48+
- name: Install Dependicies1
49+
run: npm install -D --save autoprefixer
50+
- name: Install Dependicies2
51+
run: npm install -D --save postcss-cli
52+
# Also specifies the theme we want to use
53+
- name: Build
54+
run: hugo --configDir config/tasks --environment production --minify
55+
56+
- name: Deploy tutorials.aspose.cloud(tutorials-tasks)(family)(Production) to S3
57+
run: hugo --configDir config/tasks --environment production deploy --target "Production" --maxDeletes 0
58+
env:
59+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
60+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
61+
# Invalidate Cloudfront
62+
- name: invalidate
63+
uses: chetan/invalidate-cloudfront-action@v2
64+
env:
65+
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION_PROD }}
66+
PATHS: /tasks/*
67+
AWS_REGION: 'us-west-2'
68+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
69+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: qa-tutorials.aspose.cloud(tutorials-tasks)(family)(Stage)
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ staging ]
10+
paths:
11+
- 'content/tasks/**'
12+
pull_request:
13+
branches: [ staging ]
14+
paths:
15+
- 'content/tasks/**'
16+
17+
# Allows you to run this workflow manually from the Actions tab
18+
workflow_dispatch:
19+
20+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
21+
jobs:
22+
# This workflow contains a single job called "build"
23+
build:
24+
# The type of runner that the job will run on
25+
runs-on: ubuntu-latest
26+
27+
# Steps represent a sequence of tasks that will be executed as part of the job
28+
steps:
29+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
with:
33+
submodules: true # Fetch Hugo themes
34+
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
35+
- name: Checkout theme repo
36+
uses: actions/checkout@main
37+
with:
38+
repository: aspose-cloud/tutorials-theme
39+
token: ${{ secrets.REPO_TOKEN }}
40+
fetch-depth: 0
41+
path: themes/tutorials-theme
42+
# Step 2 - Sets up the latest version of Hugo
43+
- name: Setup Hugo
44+
uses: peaceiris/actions-hugo@v2
45+
with:
46+
hugo-version: '0.135.0'
47+
extended: true
48+
- name: Install Dependicies1
49+
run: npm install -D --save autoprefixer
50+
- name: Install Dependicies2
51+
run: npm install -D --save postcss-cli
52+
# Also specifies the theme we want to use
53+
- name: Build
54+
run: hugo --configDir config/tasks --environment staging --minify
55+
56+
- name: Deploy qa-tutorials.aspose.cloud(tutorials-tasks)(family)(Stage) to S3
57+
run: hugo --configDir config/tasks --environment staging deploy --target "Stage" --maxDeletes 0
58+
env:
59+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
60+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
61+
# Invalidate Cloudfront
62+
- name: invalidate
63+
uses: chetan/invalidate-cloudfront-action@v2
64+
env:
65+
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }}
66+
PATHS: /tasks/*
67+
AWS_REGION: 'us-west-2'
68+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
69+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}

config/tasks/_default/config.toml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
baseURL = "/tasks"
2+
title = "Aspose Cloud Tutorials"
3+
staticdir = 'content/static'
4+
enableRobotsTXT = true
5+
enableGitInfo = true
6+
disableKinds = ["taxonomy", "taxonomyTerm", "page", "RSS"]
7+
8+
# Hugo allows theme composition (and inheritance). The precedence is from left to right.
9+
theme = ["tutorials-theme"]
10+
11+
[params.menu]
12+
zh = "asposecloud-zh"
13+
ru = "asposecloud-ru"
14+
ar = "asposecloud-ar"
15+
cs = "asposecloud-cs"
16+
de = "asposecloud-de"
17+
el = "asposecloud-el"
18+
es = "asposecloud-es"
19+
fr = "asposecloud-fr"
20+
hi = "asposecloud-hi"
21+
hu = "asposecloud-hu"
22+
id = "asposecloud-id"
23+
it = "asposecloud-it"
24+
ja = "asposecloud-ja"
25+
ko = "asposecloud-ko"
26+
nl = "asposecloud-nl"
27+
pl = "asposecloud-pl"
28+
pt = "asposecloud-pt"
29+
sv = "asposecloud-sv"
30+
th = "asposecloud-th"
31+
tr = "asposecloud-tr"
32+
vi = "asposecloud-vi"
33+
zh-hant = "asposecloud-zht"
34+
35+
defaultContentLang = 'en'
36+
[languages]
37+
[languages.en]
38+
contentDir = 'content/tasks/english'
39+
languageName = 'English'
40+
languageCode = "en"
41+
flag = "flag-us"
42+
weight = 10
43+
44+
ignoreFiles = ["(?i:readme.md)", '\.spin$']
45+
46+
# Image processing configuration.
47+
[imaging]
48+
resampleFilter = "CatmullRom"
49+
quality = 75
50+
anchor = "smart"
51+
52+
[services]
53+
[services.googleAnalytics]
54+
# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback].
55+
# id = "UA-00000000-0"
56+
57+
[markup]
58+
[markup.tableOfContents]
59+
endLevel = 2
60+
ordered = true
61+
startLevel = 2
62+
[markup.goldmark]
63+
[markup.goldmark.renderer]
64+
unsafe = true
65+
[markup.highlight]
66+
anchorLineNos = false
67+
codeFences = true
68+
guessSyntax = false
69+
hl_Lines = ""
70+
lineAnchors = ""
71+
lineNoStart = 1
72+
lineNos = false
73+
lineNumbersInTable = true
74+
noClasses = false
75+
tabWidth = 4
76+
77+
# Everything below this are Site Params
78+
79+
[params]
80+
copyright = "The Aspose Cloud Authors"
81+
privacy_policy = "https://policies.google.com/privacy"
82+
topbar_search_active = false
83+
logo_rel_link = ""
84+
85+
# Containerize Menu
86+
[params.containerize]
87+
menu = "asposecloud-en"
88+
89+
[params.meta]
90+
msapplication_TileColor = "#2b5797"
91+
msapplication_config = "https://cms.admin.containerize.com/templates/asposecloud/images/browserconfig.xml"
92+
theme_color = "#ffffff"
93+
author = "Aspose Cloud"
94+
95+
# Title of 404 page
96+
title_404_page = "404 - Page Not Found | Aspose Cloud Tutorials"
97+
98+
# Open Grapgh settings
99+
title = "Aspose Cloud Tutorials"
100+
images = ["images/aspose-cloud-image-for-open-graph.jpg"]
101+
description = "Send REST API calls to manipulate Word, Excel, PDF, PowerPoint, Outlook, Visio and more than 100 file formats."
102+
103+
104+
# Set to true to disable breadcrumb navigation.
105+
breadcrumb_disable = false
106+
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
107+
sidebar_search_disable = true
108+
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
109+
navbar_logo = false
110+
# Set to true to disable the About link in the site footer
111+
footer_about_disable = false
112+
113+
114+
[minify]
115+
disableCSS = false
116+
disableHTML = false
117+
disableJS = false
118+
disableJSON = false
119+
disableSVG = false
120+
disableXML = false
121+
minifyOutput = true
122+
[minify.tdewolff]
123+
[minify.tdewolff.css]
124+
decimals = -1
125+
keepCSS2 = true
126+
[minify.tdewolff.html]
127+
keepConditionalComments = true
128+
keepDefaultAttrVals = true
129+
keepDocumentTags = true
130+
keepEndTags = true
131+
keepQuotes = false
132+
keepWhitespace = false
133+
[minify.tdewolff.js]
134+
[minify.tdewolff.json]
135+
[minify.tdewolff.svg]
136+
decimals = -1
137+
[minify.tdewolff.xml]
138+
keepWhitespace = false
139+
140+
[Taxonomies]
141+
142+
[deployment]
143+
[[deployment.matchers]]
144+
# Set custom content type for /sitemap.xml
145+
#pattern = "^sitemap\\.xml$"
146+
#pattern = "^[a-z]\\.xml$"
147+
pattern = "^.+\\.(xml)$"
148+
contentType = "application/xml"
149+
gzip = true
150+
force = true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
baseURL = "https://tutorials.aspose.cloud/tasks"
2+
3+
# Google Tag Manager settings
4+
[params.gtm]
5+
gtm_id = "GTM-TSXP9CZ"
6+
7+
[[deployment.targets]]
8+
name = "Production"
9+
URL = "s3://tutorials.aspose.cloud/?prefix=tasks/&region=us-west-2"

config/tasks/staging/config.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
baseURL = "https://qa-tutorials.aspose.cloud/tasks"
2+
3+
[[deployment.targets]]
4+
name = "Stage"
5+
URL = "s3://qa-tutorials.aspose.cloud/?prefix=tasks /&region=us-west-2"
6+
7+
8+

0 commit comments

Comments
 (0)