1
1
# This is a basic workflow to help you get started with Actions
2
2
3
- name : reference.aspose.com(tutorials-slides)(family)(Production)
3
+ name : CopyChangesToThemeRepo
4
4
5
5
# Controls when the action will run.
6
6
on :
7
- # Triggers the workflow on push or pull request events but only for the master branch
7
+ # Triggers the workflow on push or pull request events but only for the main branch
8
8
push :
9
- branches : [ master ]
10
- paths :
11
- - ' content/**'
9
+ branches : [ main ]
12
10
pull_request :
13
- branches : [ master ]
14
- paths :
15
- - ' content/**'
11
+ branches : [ main ]
16
12
17
13
# Allows you to run this workflow manually from the Actions tab
18
14
workflow_dispatch :
@@ -22,48 +18,17 @@ jobs:
22
18
# This workflow contains a single job called "build"
23
19
build :
24
20
# The type of runner that the job will run on
25
- runs-on : macos -latest
21
+ runs-on : ubuntu -latest
26
22
27
23
# Steps represent a sequence of tasks that will be executed as part of the job
28
24
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/slides --environment production --minify
55
-
56
- - name : Deploy apireference2.aspose.com(tutorials-slides)(family)(Production) to S3
57
- run : hugo --configDir config/slides --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/slides/*
67
- AWS_REGION : ' us-west-2'
68
- AWS_ACCESS_KEY_ID : ${{ secrets.ACCESS_KEY }}
69
- AWS_SECRET_ACCESS_KEY : ${{ secrets.SECRET_ACCESS }}
25
+ - name : Copycat
26
+ uses : andstor/copycat-action@v3
27
+ with :
28
+ personal_token : ${{ secrets.REPO_TOKEN }}
29
+ src_path : ./slides/
30
+ dst_path : /content/
31
+ dst_owner : Aspose
32
+ dst_repo_name : tutorials.aspose.com
33
+ dst_branch : main
34
+ src_branch : main
0 commit comments