Skip to content

Fixing keys.schema.json raw github url #124

Fixing keys.schema.json raw github url

Fixing keys.schema.json raw github url #124

name: Staging deployment
# rebuild any PRs and main branch changes
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.12.2
run_install: true
- name: Use Node.js 16.x
uses: actions/setup-node@v3.4.1
with:
node-version: 16.x
cache: "pnpm"
- run: pnpm run package
- run: cp -r packages/bpp/dist dist
- run: cp action.yml dist/
- run: cp README.md dist/
- run: cp keys.schema.json dist/
- name: Deploy to staging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
pnpm dlx gh-pages -d dist -b staging -u "Plasmo G.A.T Deployer <support@plasmo.com>"
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
ref: staging
- uses: ./
env:
NODE_ENV: "test"
with:
artifact: build/artifact.zip
keys: ${{ secrets.BPP_KEYS }}