Skip to content

Commit b6f4c08

Browse files
Workflows
0 parents  commit b6f4c08

File tree

7 files changed

+475
-0
lines changed

7 files changed

+475
-0
lines changed

.github/workflows/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: reference.aspose.com(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: [ main ]
10+
paths:
11+
- 'content/**'
12+
pull_request:
13+
branches: [ main ]
14+
paths:
15+
- 'content/**'
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: macos-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/api-theme
39+
token: ${{ secrets.REPO_TOKEN }}
40+
fetch-depth: 0
41+
path: themes/api-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.97.3'
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 apireference2.aspose.com(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: /tutorials/tasks/*
67+
AWS_REGION: 'us-west-2'
68+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
69+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}

.github/workflows/staging.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: reference2.aspose.com(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/**'
12+
pull_request:
13+
branches: [ staging ]
14+
paths:
15+
- 'content/**'
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: macos-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/api-theme
39+
token: ${{ secrets.REPO_TOKEN }}
40+
ref: beta
41+
fetch-depth: 0
42+
path: themes/api-theme
43+
# Step 2 - Sets up the latest version of Hugo
44+
- name: Setup Hugo
45+
uses: peaceiris/actions-hugo@v2
46+
with:
47+
hugo-version: '0.97.3'
48+
extended: true
49+
- name: Install Dependicies1
50+
run: npm install -D --save autoprefixer
51+
- name: Install Dependicies2
52+
run: npm install -D --save postcss-cli
53+
# Also specifies the theme we want to use
54+
- name: Build
55+
run: hugo --configDir config/tasks --environment staging --minify
56+
57+
- name: Deploy apireference2.aspose.com(tutorials-tasks)(family)(Stage) to S3
58+
run: hugo --configDir config/tasks --environment staging deploy --target "Stage" --maxDeletes 0
59+
env:
60+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
61+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
62+
# Invalidate Cloudfront
63+
- name: invalidate
64+
uses: chetan/invalidate-cloudfront-action@v2
65+
env:
66+
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }}
67+
PATHS: /tutorials/tasks/*
68+
AWS_REGION: 'us-west-2'
69+
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
70+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}

0 commit comments

Comments
 (0)