openapi-update #373
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
# The name of this GH action | |
name: Deploy | |
# Defines when this action should be run | |
on: | |
# Run on any push to main | |
# push: | |
# branches: | |
# - main | |
# Run when a repository dispatch event is received | |
repository_dispatch: | |
types: [openapi-update] | |
jobs: | |
# Deploys the english version | |
deploy-en: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
env: | |
LOCALES: "en" | |
EN_OAS3_REPO: "https://github.com/box/box-openapi.git#en" | |
PRIVATE_EN_POSTMAN_COLLECTION_ID: "8119550-3e45693c-a4d7-4d77-b02c-f7035a152898" | |
PUBLIC_EN_POSTMAN_COLLECTION_ID: "8119550-b5ea2aeb-c82a-425d-baff-ed5dfd1d7659" | |
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Deploy the collection | |
run: | | |
yarn install | |
yarn release en | |
- name: Send Slack notification | |
uses: Ilshidur/[email protected] | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_USERNAME: GitHub Actions | |
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4" | |
with: | |
args: "Deployed English Postman collection :rocket:" | |
# Deploys the japanese version | |
deploy-jp: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
needs: deploy-en | |
env: | |
LOCALES: "jp" | |
JP_OAS3_REPO: "https://github.com/box/box-openapi.git#jp" | |
PRIVATE_JP_POSTMAN_COLLECTION_ID: "8119550-8ab5448e-636f-44ee-ba16-97908b5bc7eb" | |
PUBLIC_JP_POSTMAN_COLLECTION_ID: "8119550-73df4d75-420a-455b-97c2-d3d33103c1a4" | |
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Deploy the collection | |
run: | | |
yarn install | |
yarn release jp | |
- name: Send Slack notification | |
uses: Ilshidur/[email protected] | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_USERNAME: GitHub Actions | |
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4" | |
with: | |
args: "Deployed Japanese Postman collection :rocket:" |