Skip to content

Commit 71f2586

Browse files
committed
fix: workflows
1 parent 0077afc commit 71f2586

File tree

1 file changed

+51
-43
lines changed

1 file changed

+51
-43
lines changed

.github/workflows/automated.yml

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,83 @@
1-
name: Automated Deployment
2-
3-
on:
1+
name: Automated
2+
"on":
43
push:
54
branches:
65
- master
7-
86
jobs:
97
about:
108
runs-on: ubuntu-latest
119
steps:
1210
- name: Checkout
1311
uses: actions/checkout@v2
14-
1512
- name: Jaid/action-sync-node-meta
1613
uses: jaid/action-sync-node-meta@v1.4.0
1714
with:
18-
direction: overwrite-github # default is overwrite-file
19-
githubToken: ${{ secrets.GITHUB }}
20-
21-
# docs:
22-
# runs-on: ubuntu-latest
23-
# steps:
24-
# - name: Checkout
25-
# uses: actions/checkout@v2
26-
27-
# - name: update documentation
28-
# uses: CoCreate-app/CoCreate-docs@master
29-
15+
direction: overwrite-github
16+
githubToken: "${{ secrets.GITHUB }}"
3017
release:
3118
runs-on: ubuntu-latest
3219
steps:
3320
- name: Checkout
3421
uses: actions/checkout@v2
35-
3622
- name: Semantic Release
3723
uses: cycjimmy/semantic-release-action@v2
3824
id: semantic
3925
with:
40-
# You can specify specifying version range for the extra plugins if you prefer.
4126
extra_plugins: |
4227
@semantic-release/changelog
43-
@semantic-release/npm
4428
@semantic-release/git
4529
@semantic-release/github
4630
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB }}
48-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Auto Changog generator
31+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
32+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
4933
outputs:
50-
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
51-
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
52-
53-
54-
build:
34+
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
35+
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
36+
cdn:
5537
runs-on: ubuntu-latest
5638
needs: release
5739
if: needs.release.outputs.new_release_published == 'true'
5840
env:
59-
IMAGE: cocreateapps/cocreate-docs
60-
VERSION: ${{ needs.release.outputs.new_release_version }}
41+
VERSION: "${{ needs.release.outputs.new_release_version }}"
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v2
45+
- name: setup nodejs
46+
uses: actions/setup-node@v2
47+
with:
48+
node-version: 14.15.4
49+
- name: yarn install
50+
run: >
51+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
52+
.npmrc
53+
54+
yarn install
55+
- name: yarn build
56+
run: yarn build
57+
- name: upload bundle as version
58+
uses: CoCreate-app/CoCreate-s3@master
59+
with:
60+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
61+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
62+
bucket: testcrudbucket
63+
source: ./dist
64+
destination: "/docs/${{env.VERSION}}"
65+
acl: public-read
66+
- name: upload bundle as latest
67+
uses: CoCreate-app/CoCreate-s3@master
68+
with:
69+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
70+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
71+
bucket: testcrudbucket
72+
source: ./dist
73+
destination: /docs/latest
74+
acl: public-read
75+
invalidations: true
76+
docs:
77+
runs-on: ubuntu-latest
6178
steps:
62-
- uses: actions/checkout@v2
63-
- name: Login to DockerHub
64-
uses: docker/login-action@v1
65-
with:
66-
username: ${{ secrets.DOCKERHUB_USER }}
67-
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
68-
- name: docker build
69-
id: docker_build
70-
run: docker build . -t ${IMAGE}:latest -t ${IMAGE}:${VERSION}
71-
- name: docker push
72-
id: docker_push
73-
run: |
74-
docker push ${IMAGE}:latest
75-
docker push ${IMAGE}:${VERSION}
79+
- name: Checkout
80+
uses: actions/checkout@v2
81+
82+
- name: update documentation
83+
uses: CoCreate-app/CoCreate-docs@master

0 commit comments

Comments
 (0)