-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (67 loc) · 2.6 KB
/
python-java-staging-bunny.yml
File metadata and controls
74 lines (67 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This is a basic workflow to help you get started with Actions
name: qa-reference.aspose.com(slides)(python-java)(Stage) (BunnyCDN)
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ staging ]
paths:
- 'content/python-java/**'
pull_request:
branches: [ staging ]
paths:
- 'content/python-java/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Checkout theme repo
uses: actions/checkout@main
with:
repository: Aspose/api-theme
token: ${{ secrets.REPO_TOKEN }}
ref: main
fetch-depth: 0
path: themes/api-theme
# Step 2 - Sets up the latest version of Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.119.0'
extended: true
- name: Install Dependicies1
run: npm install -D --save autoprefixer
- name: Install Dependicies2
run: npm install -D --save postcss-cli
# Also specifies the theme we want to use
- name: Build
run: hugo --configDir config/python-java --environment staging --minify
- name: Sync to Ceph S3
run: |
aws s3 sync ./public/ s3://qa-reference-aspose-com/slides/python-java/ \
--endpoint-url https://s3-qa.dynabic.com \
--acl public-read \
--delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CEPH_S3_QA_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CEPH_S3_QA_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: https://s3-admin-qa.dynabic.com
- name: Purge BunnyCDN Cache
run: |
curl -siG \
-H "X-Api-Key: ${{ secrets.BUNNY_API_KEY }}" \
--data-urlencode "url=https://qa-reference.aspose.com/slides/python-java" \
"https://api.dynabic.com/bn/purge?async=true"