Skip to content

Commit ee8914e

Browse files
committed
fix: automated and manual workflows
1 parent 9844496 commit ee8914e

File tree

2 files changed

+46
-29
lines changed

2 files changed

+46
-29
lines changed

Diff for: .github/workflows/automation.yml renamed to .github/workflows/automated.yml

+2-29
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Automated Workflow
22
"on":
33
push:
44
branches:
@@ -73,34 +73,7 @@ jobs:
7373
source: ./dist
7474
destination: /conditional-logic/latest
7575
acl: public-read
76-
77-
dist:
78-
runs-on: ubuntu-latest
79-
needs: release
80-
if: needs.release.outputs.new_release_published
81-
steps:
82-
- name: Checkout
83-
uses: actions/checkout@v2
84-
with:
85-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
86-
- name: setup nodejs
87-
uses: actions/setup-node@v2
88-
with:
89-
node-version: 14.15.4
90-
- name: yarn install
91-
run: >
92-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
93-
.npmrc
94-
95-
yarn install
96-
- run: yarn build
97-
- run: git add .
98-
- run: git config user.email "[email protected]"
99-
- run: git config user.name "frank pagan"
100-
- run: git commit --allow-empty -m "add dist bundle"
101-
- run: git pull origin master
102-
- run: git commit --allow-empty -m "add dist bundle"
103-
- run: git push origin master
76+
invalidations: true
10477
docs:
10578
runs-on: ubuntu-latest
10679
steps:

Diff for: .github/workflows/manual.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Manual Workflow
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
invalidations:
6+
description: |
7+
If set to 'true', invalidates previous upload.
8+
default: "true"
9+
required: true
10+
11+
jobs:
12+
cdn:
13+
runs-on: ubuntu-latest
14+
env:
15+
DRY_RUN: ${{ github.event.inputs.dry_run }}
16+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
17+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
- name: setup nodejs
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: 14.15.4
26+
- name: yarn install
27+
run: >
28+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
29+
.npmrc
30+
31+
yarn install
32+
- name: yarn build
33+
run: yarn build
34+
- name: upload latest bundle
35+
uses: CoCreate-app/CoCreate-s3@master
36+
with:
37+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
38+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
39+
distributionId: "${{ secrets.DISTRIBUTION_ID }}"
40+
bucket: testcrudbucket
41+
source: ./dist
42+
destination: /conditional-logic/latest
43+
acl: public-read
44+
invalidations: ${{ github.event.inputs.invalidations }}

0 commit comments

Comments
 (0)