diff --git a/.github/workflows/feature_4_legacy_docs.yml b/.github/workflows/feature_4_legacy_docs.yml new file mode 100644 index 0000000..4468627 --- /dev/null +++ b/.github/workflows/feature_4_legacy_docs.yml @@ -0,0 +1,68 @@ +name: Develop > Legacy Tiny 4 Docs + +on: + workflow_dispatch: + push: + paths: + - '**' + branches: + - 'hotfix/**' + - 'feature/**' + +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 4) Install moxiedoc + run: npm i -g ephox/moxiedoc#feature/tinymcenext + + - name: (Feature - Legacy Docs 4) Build API References + run: _scripts/api-reference.sh + + - name: (Feature - Legacy Docs 4) Build Website + run: _scripts/build.sh + + - name: (deploy) Prepare for branch deployments + shell: bash + run: | + S3_BUCKET=$(node -e 'console.log(`s3://docs-v4-${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-4x + env: + AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/release_4_legacy_docs.yml b/.github/workflows/release_4_legacy_docs.yml new file mode 100644 index 0000000..74c3280 --- /dev/null +++ b/.github/workflows/release_4_legacy_docs.yml @@ -0,0 +1,70 @@ +name: Release > Legacy Tiny 4 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 4) Install moxiedoc + run: npm i -g ephox/moxiedoc#feature/tinymcenext + + - name: (Release - Legacy Docs 4) Build API References + run: _scripts/api-reference.sh + + - name: (Release - Legacy Docs 4) Build Website + run: _scripts/build.sh + + - name: (deploy) Prepare Staging files + run: _scripts/deploy-staging.sh + + - name: (deploy) Upload to Staging S3 + run: aws s3 sync --acl=public-read --delete ./_site s3://tiny-cloud-docs-v4-staging/docs-4x + env: + AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} + + - name: (deploy) Invalidate Staging Cache + run: aws cloudfront create-invalidation --distribution-id E7DUUPEI08HNW --paths "/docs-4x/*" + env: + AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} + + - name: (deploy) Prepare Production files + run: _scripts/deploy-production.sh + + - name: (deploy) Upload to Production S3 + run: aws s3 sync --acl=public-read --delete ./_site s3://tiny-cloud-docs-v4-production/docs-4x + env: + AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }} + + - name: (deploy) Invalidate Production Cache + run: aws cloudfront create-invalidation --distribution-id E3LFU502SQ5UR --paths "/docs-4x/*" + env: + AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }} diff --git a/_config.yml b/_config.yml index d8a1a8a..84e4cfa 100644 --- a/_config.yml +++ b/_config.yml @@ -24,6 +24,7 @@ exclude: - node_modules - .idea - .git + - .github markdown: redcarpet diff --git a/_scripts/deploy-production.sh b/_scripts/deploy-production.sh index ab503f6..5f11114 100755 --- a/_scripts/deploy-production.sh +++ b/_scripts/deploy-production.sh @@ -4,6 +4,10 @@ mkdir -p ./_site/css mkdir -p ./_site/scripts mkdir -p ./_site/fonts +if [ -f ./_essentials/robots.txt ]; then + rm ./_essentials/robots.txt +fi + curl -o ./_site/css/common.min.css https://www.tiny.cloud/css/common.min.css -L curl -o ./_site/css/docs.min.css https://www.tiny.cloud/css/docs.min.css -L curl -o ./_site/scripts/docs.min.js https://www.tiny.cloud/scripts/docs.min.js -L diff --git a/tash b/tash deleted file mode 100644 index 3e6126a..0000000 --- a/tash +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/_includes/configuration/visual.md b/_includes/configuration/visual.md -index 3e79790..ed53534 100644 ---- a/_includes/configuration/visual.md -+++ b/_includes/configuration/visual.md -@@ -1,6 +1,10 @@ - ## visual -  --This true/false option gives you the ability to turn on/off the visual aid for tables with no borders. If the border of a table is set to `0`, then TinyMCE adds a dotted line around the table by default. -+This true/false option gives you the ability to enable or disable the `visual` aid. -+ -+This setting also allows `visual` aid to override the `Menu` settings. For instance, you can enable or disable `visual` aid even if the `Menu` is set to `False`. -+ -+If the border of a table is set to `0`, then TinyMCE adds a dotted line around the table by default. -  - **Type:** `Boolean` -  -@@ -12,7 +16,7 @@ This true/false option gives you the ability to turn on/off the visual aid for t -  - ```js - tinymce.init({ -- selector: 'textarea', // change this value according to your HRML -+ selector: 'textarea', // change this value according to your HTML - visual: false - }); - ``` diff --git a/wercker.yml b/wercker.yml deleted file mode 100644 index 4797a34..0000000 --- a/wercker.yml +++ /dev/null @@ -1,68 +0,0 @@ -box: - id: jointiny/tiny-cloud-docs-build - username: $DOCKER_USER - password: $DOCKER_PASSWORD - tag: latest -no-response-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 - -invalidate_cache: - steps: - - script: - code: aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/docs-4x/*" - -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-v4-${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-4x/ - 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-4x/ - 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-4x/ - source-dir: $S3_SOURCE - opts: --delete-removed