added production branch to project create #439
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches-ignore: | |
- master | |
jobs: | |
develop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Setup .npmrc file to publish to npm | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install packages | |
run: npm install | |
- name: Build | |
run: npm run build --ws --if-present | |
- name: Build landing | |
run: npm run build-web -w sandbox | |
- name: Install wrangler | |
run: npm i wrangler | |
- name: Idempotent project create | |
run: npx wrangler pages project create graphql-editor-dev --production-branch develop | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
continue-on-error: true | |
- name: Publish output | |
run: npx wrangler pages deploy ./packages/sandbox/out --branch ${GITHUB_REF##*/} --project-name graphql-editor-dev | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |