Skip to content

fix: try different approach to action #2

fix: try different approach to action

fix: try different approach to action #2

Workflow file for this run

name: Deploy Script
on:
workflow_dispatch:
push:
branches: [main, develop]
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install clasp
run: npm install -g @google/[email protected]
- name: Setup clasp authentication
run: |
echo "${{ secrets.CLASPRC_JSON }}" > ~/.clasprc.json
clasp login --status
- name: Update CLASPRC_JSON secret if changed
if: env.CLASPRC_JSON_FILE != secrets.CLASPRC_JSON

Check failure on line 24 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy Script

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 24, Col: 13): Unrecognized named-value: 'secrets'. Located at position 26 within expression: env.CLASPRC_JSON_FILE != secrets.CLASPRC_JSON
uses: hmanzur/[email protected]
with:
name: "CLASPRC_JSON"
value: ${{ env.CLASPRC_JSON_FILE }}
repository: ${{ github.repository }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
env:
CLASPRC_JSON_FILE: ${{ secrets.CLASPRC_JSON }}
- name: Checkout repository
if: github.event_name != 'schedule'
uses: actions/checkout@v2
- name: Set scriptId in .clasp.json
if: github.event_name != 'schedule' && env.SCRIPT_ID
run: |
jq '.scriptId = "${{ secrets.SCRIPT_ID }}"' .clasp.json > temp.json && mv temp.json .clasp.json
- name: Push script
if: github.event_name != 'schedule'
run: clasp push -f
- name: Deploy script
if: env.DEPLOYMENT_ID && (github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main'))
run: clasp deploy -i "${{ secrets.DEPLOYMENT_ID }}" -d "${{ github.ref }}"