Skip to content

Merge pull request #13 from Vonter/document-flows #13

Merge pull request #13 from Vonter/document-flows

Merge pull request #13 from Vonter/document-flows #13

Workflow file for this run

name: Workflow to build and deploy Swagger UI from main branch to Netlify
on:
push:
branches:
- main
jobs:
deploy-prod:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
- name: Deploy 🚀
uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: './dist'
production-deploy: true
production-branch: main
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 5