Skip to content

edge v1.1 authorization migration #129

edge v1.1 authorization migration

edge v1.1 authorization migration #129

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/[email protected]
with:
version: latest
run_install: true
- name: Use Node.js 16.x
uses: actions/[email protected]
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 <[email protected]>"
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 }}