Skip to content

Commit 13d6210

Browse files
authored
Update production.yml
1 parent 3a78a25 commit 13d6210

File tree

1 file changed

+15
-50
lines changed

1 file changed

+15
-50
lines changed

.github/workflows/production.yml

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# This is a basic workflow to help you get started with Actions
22

3-
name: reference.aspose.com(tutorials-slides)(family)(Production)
3+
name: CopyChangesToThemeRepo
44

55
# Controls when the action will run.
66
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
88
push:
9-
branches: [ master ]
10-
paths:
11-
- 'content/**'
9+
branches: [ main ]
1210
pull_request:
13-
branches: [ master ]
14-
paths:
15-
- 'content/**'
11+
branches: [ main ]
1612

1713
# Allows you to run this workflow manually from the Actions tab
1814
workflow_dispatch:
@@ -22,48 +18,17 @@ jobs:
2218
# This workflow contains a single job called "build"
2319
build:
2420
# The type of runner that the job will run on
25-
runs-on: macos-latest
21+
runs-on: ubuntu-latest
2622

2723
# Steps represent a sequence of tasks that will be executed as part of the job
2824
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

Comments
 (0)