Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub action to deploy to sdk.paraswap.io #138

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and deploy Docs

on:
push:
branches:
- master
workflow_dispatch:

concurrency:
group: ${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

env:
frontend_name: sdk
build_command: yarn docs:html
assets_location: ./docs/html

jobs:
build-and-deploy-frontend:
name: Build and deploy frontend
runs-on: ubuntu-latest

steps:
- name: Checkout Composite Actions Repository
uses: actions/checkout@v2
with:
repository: paraswap/paraswap-github-actions
ref: master
token: ${{ secrets.PARASWAP_GITHUB_ACTIONS_PAT }}
path: .github/paraswap-github-actions

- name: Build and deploy frontend using composite action
uses: ./.github/paraswap-github-actions/build-and-deploy-frontend
with:
frontend_name: ${{ env.frontend_name }}
build_command: ${{ env.build_command }}
assets_location: ${{ env.assets_location }}
repository_sha: ${{ github.sha}}
event_name: ${{ github.event_name }}
authentication_token: ${{ secrets.AUTHENTICATION_KEY }}
authorization_token: ${{ secrets.AUTHORIZATION_KEY }}
data_center: ${{ secrets.DATA_CENTER }}

# We re-checkout composite actions repository due to a known bug that if composite action does its own checkout, it deletes any previous checkouts
# thus, the post action fails on not finding the composite action we checked-out. See: https://github.com/actions/runner/issues/1300
- name: ReCheckout Composite Actions Repository
uses: actions/checkout@v2
with:
repository: paraswap/paraswap-github-actions
ref: master
token: ${{ secrets.PARASWAP_GITHUB_ACTIONS_PAT }}
path: .github/paraswap-github-actions