add clasp json #48
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
name: Deploy Apps Script | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'latest' # Specifies the latest version of Node.js | |
- name: Install clasp globally | |
run: npm install -g @google/clasp | |
- name: Insert config to main folder | |
run: echo $CLASP_SETTINGS_JSON > .clasprc.json & echo $CLASP_JSON > .clasp.json | |
env: | |
CLASP_SETTINGS_JSON: ${{ secrets.clasprc_json }} | |
CLASP_JSON: ${{ secrets.clasp_json }} | |
- name: Clasp login globally | |
run: clasp login --creds ./.clasprc.json | |
- name: Clasp push | |
run: clasp push -f | |
- name: Clasp deploy | |
run: clasp deploy -i ${{ secrets.DEPLOY_ID }} -d ${{ github.event.head_commit.message }} -V $(git rev-parse --short "$GITHUB_SHA") | |
# - name: Deploy to Apps Script | |
# uses: daikikatsuragawa/clasp-action@v1.1.0 | |
# with: | |
# accessToken: ${{ secrets.ACCESS_TOKEN }} | |
# idToken: ${{ secrets.ID_TOKEN }} | |
# refreshToken: ${{ secrets.REFRESH_TOKEN }} | |
# clientId: ${{ secrets.CLIENT_ID }} | |
# clientSecret: ${{ secrets.CLIENT_SECRET }} | |
# scriptId: ${{ secrets.SCRIPT_ID }} | |
# deployId: ${{ secrets.DEPLOY_ID }} | |
# rootDir: "./" | |
# command: 'deploy' |