-
Notifications
You must be signed in to change notification settings - Fork 13
50 lines (50 loc) · 1.76 KB
/
Copy pathdeploy.yml
File metadata and controls
50 lines (50 loc) · 1.76 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
name: Deploy
on:
push:
tags:
- "*"
jobs:
tag:
name: New version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install node version
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: |
npm ci
composer install --no-dev --prefer-dist --no-progress --no-suggest
- name: Make build
run: |
npm run build
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
- name: Make dist
run: npm run dist
- name: Generate file checksums
uses: Codeinwp/action-release-checksums@main
- name: Upload Latest Version to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
SOURCE_DIR: "artifact" # optional: defaults to entire repository
DEST_DIR: products/optimole-wp/latest
- name: Clear Cloudfront Cache
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.API_DIST_ID }}
PATHS: "/download/optimole/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }}