Skip to content

Update Paragraph workflow #2

Update Paragraph workflow

Update Paragraph workflow #2

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Push to Paragon
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/[email protected]
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.
node-version: 20.x
- name: Install para CLI
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm install -g @useparagon/cli@next
- name: Authenticate into CLI
env:
PARAGON_CLI_KEY: ${{ secrets.PARAGON_CLI_KEY }}
run: |
mkdir -p ~/.paragon
cat << EOF > ~/.paragon/credentials.json
{
"default": {
"profile": "default",
"token": "$PARAGON_CLI_KEY"
}
}
EOF
cat << EOF > ~/.paragon/profiles.json
{
"default": {
"name": "default",
"default": true,
"services": {
"zeus": "https://seis-zeus.paragonsandbox.com",
"dashboard": "https://seis.paragonsandbox.com"
}
}
}
EOF
- name: Build Paragraph project
run: |
para install
para build
- name: Push to Paragon
if: github.event_name == 'push'
run: para push