-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-sign-template
- Loading branch information
Showing
9 changed files
with
11,046 additions
and
8,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,38 @@ jobs: | |
run: | | ||
yarn lint | ||
# Verify compiled schema is up to date | ||
# If this action fails, it means one have to run `yarn build:schema` and commit changes in the file | ||
verify-compiled-schema-up-to-date: | ||
name: Verify openapi.json file is up to date | ||
# We run this on the latest ubuntu | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || github.event_name == 'pull_request' | ||
timeout-minutes: 10 | ||
|
||
# We use node 14.X | ||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
|
||
# The following steps are performed for each job | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Compile the content | ||
run: | | ||
yarn install | ||
yarn build:schema | ||
- name: Verify openapi.json file is up to date (run 'yarn build:schema' and commit changes in openapi.json file if this command returns error) | ||
run: git diff --quiet openapi.json | ||
|
||
# The deploy task actually deploys any changes to the en branch | ||
push-to-en: | ||
# We run this on the latest ubuntu | ||
|
@@ -73,7 +105,7 @@ jobs: | |
needs: | ||
- lint | ||
|
||
# The following steps are performed for each lint job | ||
# The following steps are performed for each job | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
@@ -86,23 +118,23 @@ jobs: | |
- name: Compile the content | ||
run: | | ||
yarn install | ||
yarn build | ||
yarn build:content | ||
yarn build:swagger | ||
- name: Push compiled content | ||
uses: s0/[email protected] | ||
env: | ||
REPO: self | ||
BRANCH: en | ||
FOLDER: compiled/openapi | ||
FOLDER: compiled/content | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push GH pages for redundancy | ||
uses: s0/[email protected] | ||
env: | ||
REPO: self | ||
BRANCH: gh-pages | ||
FOLDER: compiled/openapi | ||
FOLDER: compiled/content | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push Swagger 2.0 backport | ||
|
@@ -168,7 +200,7 @@ jobs: | |
needs: | ||
- lint | ||
|
||
# The following steps are performed for each lint job | ||
# The following steps are performed for each job | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
@@ -181,14 +213,14 @@ jobs: | |
- name: Compile the content | ||
run: | | ||
yarn install | ||
yarn build | ||
yarn build:content | ||
- name: Push compiled content | ||
uses: s0/[email protected] | ||
env: | ||
REPO: self | ||
BRANCH: en-staging | ||
FOLDER: compiled/openapi | ||
FOLDER: compiled/content | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "Trigger Netlify deployment" | ||
|
@@ -222,7 +254,7 @@ jobs: | |
# We run this on the latest ubuntu | ||
runs-on: ubuntu-latest | ||
|
||
# The following steps are performed for each lint job | ||
# The following steps are performed for each job | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
@@ -238,7 +270,7 @@ jobs: | |
run: | | ||
cd $GITHUB_WORKSPACE/box-openapi | ||
yarn install | ||
yarn build | ||
yarn build:content | ||
- name: Check out the Codegen repo | ||
uses: actions/checkout@v3 | ||
|
@@ -254,5 +286,5 @@ jobs: | |
npm install | ||
cd scripts | ||
npm install | ||
cp $GITHUB_WORKSPACE/box-openapi/compiled/openapi/openapi.json . | ||
cp $GITHUB_WORKSPACE/box-openapi/compiled/content/openapi.json . | ||
npm run validate ./openapi.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.