Skip to content

Commit

Permalink
fix: automated and manual workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitamin committed Jun 30, 2021
1 parent 1bc4baa commit 2ab89bc
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Automated Workflow
"on":
push:
branches:
Expand Down Expand Up @@ -73,34 +73,7 @@ jobs:
source: ./dist
destination: /builder/latest
acl: public-read

dist:
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.new_release_published
steps:
- name: Checkout
uses: actions/checkout@v2
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: setup nodejs
uses: actions/setup-node@v2
with:
node-version: 14.15.4
- name: yarn install
run: >
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
.npmrc
yarn install
- run: yarn build
- run: git add .
- run: git config user.email "[email protected]"
- run: git config user.name "frank pagan"
- run: git commit --allow-empty -m "add dist bundle"
- run: git pull origin master
- run: git commit --allow-empty -m "add dist bundle"
- run: git push origin master
invalidations: true
docs:
runs-on: ubuntu-latest
steps:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Manual Workflow
on:
workflow_dispatch:
inputs:
invalidations:
description: |
If set to 'true', invalidates previous upload.
default: "true"
required: true

jobs:
cdn:
runs-on: ubuntu-latest
env:
DRY_RUN: ${{ github.event.inputs.dry_run }}
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"

steps:
- name: Checkout
uses: actions/checkout@v2
- name: setup nodejs
uses: actions/setup-node@v2
with:
node-version: 14.15.4
- name: yarn install
run: >
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
.npmrc
yarn install
- name: yarn build
run: yarn build
- name: upload latest bundle
uses: CoCreate-app/CoCreate-s3@master
with:
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
distributionId: "${{ secrets.DISTRIBUTION_ID }}"
bucket: testcrudbucket
source: ./dist
destination: /builder/latest
acl: public-read
invalidations: ${{ github.event.inputs.invalidations }}
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
}
</script>

<script src="https://server.cocreate.app/CoCreateJS/dist/CoCreate.js"></script>
<!--<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>-->
<!--<script src="https://server.cocreate.app/CoCreateJS/dist/CoCreate.js"></script>-->
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>

</body>

Expand Down

0 comments on commit 2ab89bc

Please sign in to comment.