Skip to content

docs(APIMGMT-670): Introducing 2024.0 version #4329

docs(APIMGMT-670): Introducing 2024.0 version

docs(APIMGMT-670): Introducing 2024.0 version #4329

Workflow file for this run

# The name of this GH action
name: CI
# Defines when this action should be run
on:
# Run on any Push
push:
branches-ignore:
- en
- en-staging
- en-abtest
- en-snapshot
- jp
- jp-partial
# Run for PRs on main and staging
pull_request:
branches: [main, staging, abtest]
jobs:
# The lint job checks that all content is sanitized,
# spell checked, and without any obvious dead links
lint:
# We run this on the latest ubuntu
runs-on: ubuntu-latest
timeout-minutes: 3
# We use node 18.X
strategy:
matrix:
node-version: [18.x]
# The following steps are performed for each lint job
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Lint the yaml files in ./content
uses: karancode/yamllint-github-action@v2.0.0
with:
yamllint_file_or_dir: ./content
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Lint the content
run: |
yarn install
yarn ci
# The test job ensures that the markdown and yaml compilers
# work according to specifiction
test:
# We run this on the latest ubuntu
runs-on: ubuntu-latest
timeout-minutes: 3
# We use node 18.X
strategy:
matrix:
node-version: [18.x]
# The following steps are performed for each lint job
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Run the test
run: |
yarn install
yarn test
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
if: github.ref == 'refs/heads/main'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Markdown passed linting and testing"
# The deploy task actually deploys any changes to the en branch
push-to-en:
# We run this on the latest ubuntu
runs-on: ubuntu-latest
timeout-minutes: 3
# Only run for the main branch
if: github.ref == 'refs/heads/main'
# We use node 18.X
strategy:
matrix:
node-version: [18.x]
# Requires the lint and test jobs to pass first
needs:
- lint
- test
# The following steps are performed for each lint job
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Compile the content
run: |
yarn install
yarn build
- name: Push compiled content
uses: s0/git-publish-subdir-action@v2.4.0
env:
REPO: self
BRANCH: en
FOLDER: compiled
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Trigger Netlify deployment"
uses: joelwmale/webhook-action@2.0.2
env:
WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_WEBHOOK }}
data: "{}"
- name: "Trigger Netlify deployment (Box.dev mirror)"
uses: joelwmale/webhook-action@2.0.2
env:
WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_MIRROR_WEBHOOK }}
data: "{}"
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Pushed latest Markdown to `en` branch :rocket:"
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
if: ${{ failure() }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Error running `deploy` job in OpenAPI CI"
# The deploy task actually deploys any changes to the en-staging branch
push-to-en-staging:
# We run this on the latest ubuntu
runs-on: ubuntu-latest
# Only run for the staging branch
if: github.ref == 'refs/heads/staging'
# We use node 18.X
strategy:
matrix:
node-version: [18.x]
# Requires the lint and test jobs to pass first
needs:
- lint
- test
# The following steps are performed for each lint job
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Compile the content
run: |
yarn install
yarn build
- name: Push compiled content
uses: s0/git-publish-subdir-action@v2.4.0
env:
REPO: self
BRANCH: en-staging
FOLDER: compiled
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Trigger Netlify deployment"
uses: joelwmale/webhook-action@2.0.2
env:
WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_STAGING_WEBHOOK }}
data: "{}"
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Pushed latest Markdown to `en-staging` branch :rocket:"
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
if: ${{ failure() }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Error running `deploy-staging` job in OpenAPI CI"
# The deploy task actually deploys any changes to the en-staging branch
push-to-en-abtest:
# We run this on the latest ubuntu
runs-on: ubuntu-latest
# Only run for the staging branch
if: github.ref == 'refs/heads/abtest'
# We use node 18.X
strategy:
matrix:
node-version: [18.x]
# Requires the lint and test jobs to pass first
needs:
- lint
- test
# The following steps are performed for each lint job
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Compile the content
run: |
yarn install
yarn build
- name: Push compiled content
uses: s0/git-publish-subdir-action@v2.4.0
env:
REPO: self
BRANCH: en-abtest
FOLDER: compiled
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Trigger Netlify deployment"
uses: joelwmale/webhook-action@2.0.2
env:
WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_ABTEST_WEBHOOK }}
data: "{}"
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Pushed latest Markdown to `abtest` branch :rocket:"
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
if: ${{ failure() }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Error running `deploy-abtest` job in OpenAPI CI"