Skip to content

edge v1.1 authorization migration #140

edge v1.1 authorization migration

edge v1.1 authorization migration #140

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@v4
with:
submodules: "recursive"
- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v4
with:
version: 9.12.3
run_install: true
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.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@v4
with:
ref: staging
- uses: ./
env:
NODE_ENV: "test"
with:
artifact: build/artifact.zip
keys: ${{ secrets.BPP_KEYS }}