Merge pull request #27 from k-kozika/dependabot/npm_and_yarn/rollup-4… #24
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: | |
- 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 |