Browse Source
DOC-1640: Setup GitHub action workflows for publishing legacy jekyll docs
pull/2387/head
DOC-1640: Setup GitHub action workflows for publishing legacy jekyll docs
pull/2387/head

committed by
Lee Newson

6 changed files with 180 additions and 108 deletions
-
67.github/workflows/feature_5_legacy_docs.yml
-
55.github/workflows/release_5_legacy_docs.yml
-
55.github/workflows/staging_5_legacy_docs.yml
-
3_config.yml
-
26tash
-
82wercker.yml
@ -0,0 +1,67 @@ |
|||
name: Develop > Legacy Tiny 5 Docs |
|||
|
|||
on: |
|||
workflow_dispatch: |
|||
push: |
|||
paths: |
|||
- '**' |
|||
branches: |
|||
- 'feature/5/DOC-1640' |
|||
|
|||
env: |
|||
JEKYLL_ENV: production |
|||
|
|||
jobs: |
|||
build: |
|||
name: Build Docs and Deploy |
|||
runs-on: ubuntu-18.04 |
|||
|
|||
steps: |
|||
- uses: actions/checkout@v1 |
|||
|
|||
- uses: actions/setup-node@v2 |
|||
with: |
|||
node-version: 14 |
|||
|
|||
- uses: ruby/setup-ruby@v1 |
|||
env: |
|||
BUNDLE_DEPLOYMENT: true |
|||
with: |
|||
ruby-version: 2.6 |
|||
bundler-cache: true |
|||
|
|||
- name: (Feature - Legacy Docs 5) Install moxiedoc |
|||
run: npm i -g ephox/moxiedoc#feature/tinymcenext |
|||
|
|||
- name: (Feature - Legacy Docs 5) Build API References |
|||
run: _scripts/api-reference.sh |
|||
|
|||
- name: (Feature - Legacy Docs 5) Build Website |
|||
run: _scripts/build.sh |
|||
|
|||
- name: (deploy) Prepare for branch deployments |
|||
shell: bash |
|||
run: | |
|||
S3_BUCKET=$(node -e 'console.log(`s3://docs-v5-${process.env.GITHUB_REF.replace("refs/heads/","").replace(/[/\s]/g, "-").replace(/[^0-9a-zA-Z-]/g, "").replace(/-$/g, "").toLowerCase()}.staging.tiny.cloud`)') |
|||
printf "S3_BUCKET: ${S3_BUCKET} (${#S3_BUCKET})\n" |
|||
|
|||
if [ ${#S3_BUCKET} -lt 3 ] |
|||
then |
|||
echo "WARNING! S3_BUCKET name is too short" |
|||
fi |
|||
|
|||
if [ ${#S3_BUCKET} -gt 63 ] |
|||
then |
|||
echo "WARNING! S3_BUCKET name is too long" |
|||
fi |
|||
|
|||
echo $S3_BUCKET > S3_BUCKET |
|||
|
|||
- name: (deploy) Prepare files |
|||
run: _scripts/deploy-branch.sh |
|||
|
|||
- name: (deploy) Upload website to S3 |
|||
run: aws s3 sync --acl=public-read --delete ./_site $(cat S3_BUCKET)/docs |
|||
env: |
|||
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} |
|||
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} |
@ -0,0 +1,55 @@ |
|||
name: Release > Legacy Tiny 5 Docs |
|||
|
|||
on: |
|||
workflow_dispatch: |
|||
push: |
|||
paths: |
|||
- '**' |
|||
branches: |
|||
- 'main' |
|||
|
|||
env: |
|||
JEKYLL_ENV: production |
|||
|
|||
jobs: |
|||
build: |
|||
name: Build Docs and Deploy |
|||
runs-on: ubuntu-18.04 |
|||
|
|||
steps: |
|||
- uses: actions/checkout@v1 |
|||
|
|||
- uses: actions/setup-node@v2 |
|||
with: |
|||
node-version: 14 |
|||
|
|||
- uses: ruby/setup-ruby@v1 |
|||
env: |
|||
BUNDLE_DEPLOYMENT: true |
|||
with: |
|||
ruby-version: 2.6 |
|||
bundler-cache: true |
|||
|
|||
- name: (Release - Legacy Docs 5) Install moxiedoc |
|||
run: npm i -g ephox/moxiedoc#feature/tinymcenext |
|||
|
|||
- name: (Release - Legacy Docs 5) Build API References |
|||
run: _scripts/api-reference.sh |
|||
|
|||
- name: (Release - Legacy Docs 5) Build Website |
|||
run: _scripts/build.sh |
|||
|
|||
- name: (deploy) Prepare files |
|||
run: _scripts/deploy-production.sh |
|||
|
|||
- name: (deploy) Upload to S3 |
|||
run: aws s3 sync --acl=public-read --delete ./_site s3://tiny-cloud-docs-production/docs |
|||
env: |
|||
AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }} |
|||
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }} |
|||
|
|||
- name: (deploy) Invalidate Cache |
|||
run: aws cloudfront create-invalidation --distribution-id E3LFU502SQ5UR --paths "/docs/*" |
|||
env: |
|||
AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }} |
|||
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }} |
@ -0,0 +1,55 @@ |
|||
name: Staging > Legacy Tiny 5 Docs |
|||
|
|||
on: |
|||
workflow_dispatch: |
|||
push: |
|||
paths: |
|||
- '**' |
|||
branches: |
|||
- 'develop' |
|||
|
|||
env: |
|||
JEKYLL_ENV: production |
|||
|
|||
jobs: |
|||
build: |
|||
name: Build Docs and Deploy |
|||
runs-on: ubuntu-18.04 |
|||
|
|||
steps: |
|||
- uses: actions/checkout@v1 |
|||
|
|||
- uses: actions/setup-node@v2 |
|||
with: |
|||
node-version: 14 |
|||
|
|||
- uses: ruby/setup-ruby@v1 |
|||
env: |
|||
BUNDLE_DEPLOYMENT: true |
|||
with: |
|||
ruby-version: 2.6 |
|||
bundler-cache: true |
|||
|
|||
- name: (Staging - Legacy Docs 5) Install moxiedoc |
|||
run: npm i -g ephox/moxiedoc#feature/tinymcenext |
|||
|
|||
- name: (Staging - Legacy Docs 5) Build API References |
|||
run: _scripts/api-reference.sh |
|||
|
|||
- name: (Staging - Legacy Docs 5) Build Website |
|||
run: _scripts/build.sh |
|||
|
|||
- name: (deploy) Prepare files |
|||
run: _scripts/deploy-staging.sh |
|||
|
|||
- name: (deploy) Upload to S3 |
|||
run: aws s3 sync --acl=public-read --delete ./_site s3://tiny-cloud-docs-staging/docs |
|||
env: |
|||
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} |
|||
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} |
|||
|
|||
- name: (deploy) Invalidate Cache |
|||
run: aws cloudfront create-invalidation --distribution-id E7DUUPEI08HNW --paths "/docs/*" |
|||
env: |
|||
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} |
|||
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} |
@ -1,26 +0,0 @@ |
|||
[1mdiff --git a/_data/nav.yml b/_data/nav.yml[m |
|||
[1mindex d8edd8c..3f2e139 100644[m |
|||
[1m--- a/_data/nav.yml[m |
|||
[1m+++ b/_data/nav.yml[m |
|||
[36m@@ -529,6 +529,8 @@[m |
|||
- url: "wordpress"[m |
|||
[m |
|||
- url: "migration-from-4x"[m |
|||
[32m+[m[32m pages:[m |
|||
[32m+[m[32m - url: "#Themes"[m |
|||
[m |
|||
- url: "release-notes"[m |
|||
pages:[m |
|||
[1mdiff --git a/migration-from-4x.md b/migration-from-4x.md[m |
|||
[1mindex c10a11e..8bcb65c 100644[m |
|||
[1m--- a/migration-from-4x.md[m |
|||
[1m+++ b/migration-from-4x.md[m |
|||
[36m@@ -1,7 +1,6 @@[m |
|||
---[m |
|||
layout: default[m |
|||
[31m-title: Migrating from TinyMCE 4.x to TinyMCE 5.0.[m |
|||
[31m-title_nav: Migrating from 4.x[m |
|||
[32m+[m[32mtitle: Migrating from 4.x[m |
|||
description: Instructions for migrating from TinyMCE 4.x to TinyMCE 5.0.[m |
|||
keywords: migration considerations premigration pre-migration[m |
|||
---[m |
@ -1,82 +0,0 @@ |
|||
box: |
|||
id: jointiny/tiny-cloud-docs-build |
|||
username: $DOCKER_USER |
|||
password: $DOCKER_PASSWORD |
|||
tag: latest |
|||
no-response-timeout: 30 |
|||
command-timeout: 30 |
|||
|
|||
build: |
|||
steps: |
|||
- add-to-known_hosts: |
|||
hostname: github.com |
|||
- add-ssh-key: |
|||
keyname: SSH_KEY |
|||
- script: |
|||
name: install moxiedoc |
|||
code: npm i -g ephox/moxiedoc#feature/tinymcenext |
|||
- bundle-install: |
|||
deployment: true |
|||
jobs: 10 |
|||
- script: |
|||
name: import tinymce api reference |
|||
code: _scripts/api-reference.sh |
|||
- script: |
|||
name: build |
|||
code: _scripts/build.sh |
|||
|
|||
check_links: |
|||
box: jointiny/tiny-cloud-docs-linkchecker |
|||
steps: |
|||
- script: |
|||
name: check links |
|||
code: _scripts/check-links-staging.sh |
|||
- s3sync: |
|||
key-id: $AWS_ACCESS_KEY_ID |
|||
key-secret: $AWS_SECRET_ACCESS_KEY |
|||
bucket-url: $S3_BUCKET/docs/ |
|||
source-dir: _report |
|||
delete-removed: false |
|||
|
|||
invalidate_cache: |
|||
steps: |
|||
- script: |
|||
code: aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/docs/*" |
|||
|
|||
deploy_branch: |
|||
steps: |
|||
- script: |
|||
name: prepare files |
|||
code: _scripts/deploy-branch.sh |
|||
- script: |
|||
name: get bucket name |
|||
code: export S3_BUCKET=$(node -e 'console.log(`s3://docs-v5-${process.env.WERCKER_GIT_BRANCH.replace(/[/\s]/g, "-").replace(/[^0-9a-zA-Z-]/g, "").replace(/-$/g, "").toLowerCase()}.staging.tiny.cloud`)') |
|||
- s3sync: |
|||
key-id: $AWS_ACCESS_KEY_ID |
|||
key-secret: $AWS_SECRET_ACCESS_KEY |
|||
bucket-url: $S3_BUCKET/docs/ |
|||
source-dir: $S3_SOURCE |
|||
|
|||
deploy_staging: |
|||
steps: |
|||
- script: |
|||
name: prepare files |
|||
code: _scripts/deploy-staging.sh |
|||
- s3sync: |
|||
key-id: $AWS_ACCESS_KEY_ID |
|||
key-secret: $AWS_SECRET_ACCESS_KEY |
|||
bucket-url: $S3_BUCKET/docs/ |
|||
source-dir: $S3_SOURCE |
|||
opts: --delete-removed |
|||
|
|||
deploy_production: |
|||
steps: |
|||
- script: |
|||
name: prepare files |
|||
code: _scripts/deploy-production.sh |
|||
- s3sync: |
|||
key-id: $AWS_ACCESS_KEY_ID |
|||
key-secret: $AWS_SECRET_ACCESS_KEY |
|||
bucket-url: $S3_BUCKET/docs/ |
|||
source-dir: $S3_SOURCE |
|||
opts: --delete-removed |
Write
Preview
Loading…
Cancel
Save
Reference in new issue