Skip to content

Deploy Static Portal #2

Deploy Static Portal

Deploy Static Portal #2

name: Deploy Static Portal
on:
workflow_dispatch:
push:
branches:
- master
jobs:
generate-portal:
runs-on: ubuntu-latest
env:
PORTAL_DIR: ${{ github.workspace }}/static-portal
steps:
- uses: actions/checkout@v4
name: Checkout repo
id: checkout-repo
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
# Generate Portal with APImatic CLI
- name: Generate Portal
run: npx @apimatic/cli portal generate --auth-key="${{ secrets.API_KEY }}" --destination=${{ env.PORTAL_DIR }}
# Upload Portal Artifact
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: static-portal
path: ${{ env.PORTAL_DIR }}
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: ${{ env.PORTAL_DIR }}
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 2