Skip to content

Merge pull request #29 from k-kozika/dependabot/npm_and_yarn/rollup-4… #27

Merge pull request #29 from k-kozika/dependabot/npm_and_yarn/rollup-4…

Merge pull request #29 from k-kozika/dependabot/npm_and_yarn/rollup-4… #27

Workflow file for this run

on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
name: deploy to staging
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Log into Google
run: echo "$AUTH_CREDENTIALS" > $HOME/.clasprc.json
env:
AUTH_CREDENTIALS: ${{ secrets.AUTH_CREDENTIALS }}
- name: Set up clasp
run: |
echo "{\"scriptId\":\"$SCRIPT_ID\",\"rootDir\":\"$GITHUB_WORKSPACE\"}" > $GITHUB_WORKSPACE/.clasp.json
env:
SCRIPT_ID: ${{ secrets.SCRIPT_ID }}
- name: Install dependencies
run: pnpm install
- name: Build and push
run: pnpm run push
- name: Deploy new version
run: |
echo "::add-mask::$DEPLOY_ID"
pnpm clasp deploy --deploymentId $DEPLOY_ID
env:
DEPLOY_ID: ${{ secrets.DEPLOY_ID }}
- name: Clean up credentials
if: ${{ always() }}
run: rm -f $HOME/.clasprc.json