Skip to content

deply-develop-start-site #87

deply-develop-start-site

deply-develop-start-site #87

name: Deploy Develop Start Usage
on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
inputs:
branch:
default: "develop"
description: "branch"
type: string
repository_dispatch:
types:
- deply-develop-start-site
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: immersive-translate/site
ref: ${{github.event.inputs.branch || 'develop'}}
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# - run: cd ./start-usage && pwd && ls -a
- run: git checkout -b main
- run: pwd
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: ./start-usage/package-lock.json
- run: rm -rf package.json && cd extension-utils && npm i && cd ../account-shared && npm i && cd ../start-usage && npm i
- run: cd start-usage && echo "VITE_PROD_API=0" > .env.local && npm run build
- run: pwd && ls -l && cd start-usage/dist && ls -l
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
workingDirectory: start-usage
apiToken: ${{ secrets.IMMERSIVE_CLOUDFLARE_API_TOKEN }}
accountId: ${{secrets.IMMERSIVE_CLOUDFLARE_ACCOUNT_ID}}
projectName: develop-onboarding
directory: dist