Skip to content

Commit 796e9a9

Browse files
Add workflow
1 parent 0b3aa20 commit 796e9a9

File tree

10 files changed

+610
-0
lines changed

10 files changed

+610
-0
lines changed

.github/workflows/cad-production.yml

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-cad)(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/cad/**'
12+
pull_request:
13+
branches: [ master ]
14+
paths:
15+
- 'content/cad/**'
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/cad --environment production --minify
55+
56+
- name: Deploy tutorials.aspose.cloud(tutorials-cad)(family)(Production) to S3
57+
run: hugo --configDir config/cad --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: /cad/*
67+
AWS_REGION: 'us-west-2'
68+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
69+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}

.github/workflows/cad-staging.yml

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-cad)(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/cad/**'
12+
pull_request:
13+
branches: [ staging ]
14+
paths:
15+
- 'content/cad/**'
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 cad 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/cad --environment staging --minify
55+
56+
- name: Deploy qa-tutorials.aspose.cloud(tutorials-cad)(family)(Stage) to S3
57+
run: hugo --configDir config/cad --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: /cad/*
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: tutorials.aspose.cloud(tutorials-imaging)(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/imaging/**'
12+
pull_request:
13+
branches: [ master ]
14+
paths:
15+
- 'content/imaging/**'
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/imaging --environment production --minify
55+
56+
- name: Deploy tutorials.aspose.cloud(tutorials-imaging)(family)(Production) to S3
57+
run: hugo --configDir config/imaging --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: /imaging/*
67+
AWS_REGION: 'us-west-2'
68+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
69+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}

.github/workflows/imaging-staging.yml

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-imaging)(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/imaging/**'
12+
pull_request:
13+
branches: [ staging ]
14+
paths:
15+
- 'content/imaging/**'
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 imaging 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/imaging --environment staging --minify
55+
56+
- name: Deploy qa-tutorials.aspose.cloud(tutorials-imaging)(family)(Stage) to S3
57+
run: hugo --configDir config/imaging --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: /imaging/*
67+
AWS_REGION: 'us-west-2'
68+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
69+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}

0 commit comments

Comments
 (0)